Get CI passing

This commit is contained in:
Luke Murphy 2020-03-01 01:49:43 +00:00
parent 9f5bd8f10d
commit 5c1623a32f
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
5 changed files with 13 additions and 13 deletions

View File

@ -9,6 +9,6 @@ except ImportError:
try:
__version__ = pkg_resources.get_distribution('flask-calibrestekje').version
__version__ = pkg_resources.get_distribution("flask-calibrestekje").version
except Exception:
__version__ = 'unknown'
__version__ = "unknown"

View File

@ -1,5 +1,5 @@
from calibrestekje import init_session
from flask import _app_ctx_stack, current_app
from flask import _app_ctx_stack, current_app # type: ignore
class CalibreStekje(object):

View File

@ -14,8 +14,8 @@ include = '\.pyi?$'
[tool.towncrier]
directory = "changelog/"
filename = "CHANGELOG.rst"
package = "flask-calibrestekje"
package_dir = "flask-calibrestekje"
package = "flask_calibrestekje"
package_dir = "flask_calibrestekje"
[[tool.towncrier.type]]
directory = "removal"

View File

@ -2,9 +2,9 @@
def test_version_fails_gracefully(mocker):
target = 'pkg_resources.get_distribution'
target = "pkg_resources.get_distribution"
mocker.patch(target, side_effect=Exception())
from flask-calibrestekje.__init__ import __version__
from flask_calibrestekje.__init__ import __version__
assert __version__ == 'unknown'
assert __version__ == "unknown"

10
tox.ini
View File

@ -16,33 +16,33 @@ deps =
pytest
pytest-cov
pytest-mock
commands = pytest test/ --cov={toxinidir}/flask-calibrestekje/ --no-cov-on-fail {posargs}
commands = pytest test/ --cov={toxinidir}/flask_calibrestekje/ --no-cov-on-fail {posargs}
[testenv:lint]
description = lint the source
skipdist = True
deps = flake8
commands = flake8 {posargs} flask-calibrestekje/ test/
commands = flake8 {posargs} flask_calibrestekje/ test/
[testenv:sort]
description = sort the source
skipdist = True
deps = isort
commands = isort {posargs:-rc -c} -sp setup.cfg flask-calibrestekje/ test/
commands = isort {posargs:-rc -c} -sp setup.cfg flask_calibrestekje/ test/
[testenv:format]
description = format the source
skipdist = True
basepython = python3.8
deps = black
commands = black {posargs:--check} flask-calibrestekje/ test/
commands = black {posargs:--check} flask_calibrestekje/ test/
[testenv:type]
description = type check the source
basepython = python3.8
skipdist = True
deps = mypy
commands = mypy flask-calibrestekje/ test/
commands = mypy flask_calibrestekje/ test/
[testenv:changelog]
description = draw up the new changelog