Skip to content

Commit

Permalink
[useblocks#2] update dependencies and sphinx versions
Browse files Browse the repository at this point in the history
  • Loading branch information
kreuzberger committed May 13, 2022
1 parent e8c7229 commit b7c0e33
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 42 deletions.
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
sphinx>=3.4
sphinxcontrib-collections
jinja2
gitpython

4 changes: 1 addition & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
from nox_poetry import session

PYTHON_VERSIONS = ["3.6", "3.8", "3.9.7"]
SPHINX_VERSIONS = ["3.2", "3.5.4", "4.1", "4.2"]
SPHINX_VERSIONS = ["4.1", "4.2", "4.3", "4.4", "4.5"]
TEST_DEPENDENCIES = [
"pytest",
"pytest-xdist",
"responses",
"pyparsing!=3.0.4",
"requests-mock",
]


Expand Down
20 changes: 2 additions & 18 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ python = ">3.6.2,<4.0"
sphinx = [
{ version = ">3.4", python = ">=3.7" },
]
requests-file = "^1.5.1" # external links
requests = "^2.25.1" # external_links

[tool.poetry.dev-dependencies]
pre-commit = "^2"
Expand All @@ -47,7 +45,6 @@ pytest-xdist="*" # parallelisation
black = "^22.3"
isort = "^5.7.0"


[tool.black]
line-length = 120

Expand Down
22 changes: 4 additions & 18 deletions tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,8 @@
NS = {"html": "http://www.w3.org/1999/xhtml"}


class HtmlNeed:
"""Helper class to parse HTML needs"""
class HtmlCollections:
"""Helper class to parse HTML collections"""

def __init__(self, need):
self.need = need

@property
def id(self):
found_id = self.need.find(".//html:a[@class='reference internal']", NS)
if found_id is None:
found_id = self.need.find(".//html:a[@class='reference internal']", {"html": ""})
return found_id.text

@property
def title(self):
found_title = self.need.find(".//html:span[@class='needs_title']", NS)
if found_title is None:
found_title = self.need.find(".//html:span[@class='needs_title']", {"html": ""})
return found_title[0].text if found_title else None # title[0] aims to the span_data element
def __init__(self, collections):
self.collections = collections

0 comments on commit b7c0e33

Please sign in to comment.