From 5c1623a32f4c08f7da6e1fb52dfcf991eeb760cc Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Sun, 1 Mar 2020 01:49:43 +0000 Subject: [PATCH] Get CI passing --- flask_calibrestekje/__init__.py | 4 ++-- flask_calibrestekje/flask_calibrestekje.py | 2 +- pyproject.toml | 4 ++-- test/test_version.py | 6 +++--- tox.ini | 10 +++++----- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/flask_calibrestekje/__init__.py b/flask_calibrestekje/__init__.py index 3f21a49..9a64a77 100644 --- a/flask_calibrestekje/__init__.py +++ b/flask_calibrestekje/__init__.py @@ -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" diff --git a/flask_calibrestekje/flask_calibrestekje.py b/flask_calibrestekje/flask_calibrestekje.py index 9a7b798..e69bab4 100644 --- a/flask_calibrestekje/flask_calibrestekje.py +++ b/flask_calibrestekje/flask_calibrestekje.py @@ -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): diff --git a/pyproject.toml b/pyproject.toml index b47471a..3595ff0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/test/test_version.py b/test/test_version.py index 99a2bfe..03ce0ff 100644 --- a/test/test_version.py +++ b/test/test_version.py @@ -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" diff --git a/tox.ini b/tox.ini index 81bcb84..cf211bf 100644 --- a/tox.ini +++ b/tox.ini @@ -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