Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
# built documents.
#
# The full version, including alpha/beta/rc tags.
init_py = open(os.path.join(os.path.dirname(__file__),
'..', 'cssselect', '__init__.py')).read()
with open(os.path.join(os.path.dirname(__file__), '..', 'cssselect', '__init__.py')) as init_file:
init_py = init_file.read()
release = re.search("VERSION = '([^']+)'", init_py).group(1)
# The short X.Y version.
version = release.rstrip('dev')
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@


ROOT = os.path.dirname(__file__)
README = open(os.path.join(ROOT, "README.rst")).read()
INIT_PY = open(os.path.join(ROOT, "cssselect", "__init__.py")).read()
with open(os.path.join(ROOT, "README.rst")) as readme_file:
README = readme_file.read()
with open(os.path.join(ROOT, "cssselect", "__init__.py")) as init_file:
INIT_PY = init_file.read()
VERSION = re.search("VERSION = '([^']+)'", INIT_PY).group(1)


Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ commands =
[testenv:pylint]
deps =
{[testenv]deps}
pylint==2.8.3
pylint==2.9.5
commands =
pylint {posargs: cssselect setup.py tests docs}

Expand Down