Get CI passing
This commit is contained in:
parent
9f5bd8f10d
commit
5c1623a32f
|
@ -9,6 +9,6 @@ except ImportError:
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
__version__ = pkg_resources.get_distribution('flask-calibrestekje').version
|
__version__ = pkg_resources.get_distribution("flask-calibrestekje").version
|
||||||
except Exception:
|
except Exception:
|
||||||
__version__ = 'unknown'
|
__version__ = "unknown"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from calibrestekje import init_session
|
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):
|
class CalibreStekje(object):
|
||||||
|
|
|
@ -14,8 +14,8 @@ include = '\.pyi?$'
|
||||||
[tool.towncrier]
|
[tool.towncrier]
|
||||||
directory = "changelog/"
|
directory = "changelog/"
|
||||||
filename = "CHANGELOG.rst"
|
filename = "CHANGELOG.rst"
|
||||||
package = "flask-calibrestekje"
|
package = "flask_calibrestekje"
|
||||||
package_dir = "flask-calibrestekje"
|
package_dir = "flask_calibrestekje"
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "removal"
|
directory = "removal"
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
|
|
||||||
def test_version_fails_gracefully(mocker):
|
def test_version_fails_gracefully(mocker):
|
||||||
target = 'pkg_resources.get_distribution'
|
target = "pkg_resources.get_distribution"
|
||||||
mocker.patch(target, side_effect=Exception())
|
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
10
tox.ini
|
@ -16,33 +16,33 @@ deps =
|
||||||
pytest
|
pytest
|
||||||
pytest-cov
|
pytest-cov
|
||||||
pytest-mock
|
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]
|
[testenv:lint]
|
||||||
description = lint the source
|
description = lint the source
|
||||||
skipdist = True
|
skipdist = True
|
||||||
deps = flake8
|
deps = flake8
|
||||||
commands = flake8 {posargs} flask-calibrestekje/ test/
|
commands = flake8 {posargs} flask_calibrestekje/ test/
|
||||||
|
|
||||||
[testenv:sort]
|
[testenv:sort]
|
||||||
description = sort the source
|
description = sort the source
|
||||||
skipdist = True
|
skipdist = True
|
||||||
deps = isort
|
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]
|
[testenv:format]
|
||||||
description = format the source
|
description = format the source
|
||||||
skipdist = True
|
skipdist = True
|
||||||
basepython = python3.8
|
basepython = python3.8
|
||||||
deps = black
|
deps = black
|
||||||
commands = black {posargs:--check} flask-calibrestekje/ test/
|
commands = black {posargs:--check} flask_calibrestekje/ test/
|
||||||
|
|
||||||
[testenv:type]
|
[testenv:type]
|
||||||
description = type check the source
|
description = type check the source
|
||||||
basepython = python3.8
|
basepython = python3.8
|
||||||
skipdist = True
|
skipdist = True
|
||||||
deps = mypy
|
deps = mypy
|
||||||
commands = mypy flask-calibrestekje/ test/
|
commands = mypy flask_calibrestekje/ test/
|
||||||
|
|
||||||
[testenv:changelog]
|
[testenv:changelog]
|
||||||
description = draw up the new changelog
|
description = draw up the new changelog
|
||||||
|
|
Loading…
Reference in New Issue