mirror of
https://github.com/python-escpos/python-escpos
synced 2025-08-24 09:03:34 +00:00
Drop Py37, improve typing and docstrings (#544)
Drops Py3.7, improves typing and adds a mypy config, improves the docstrings and isorts the imports. * configure isort * sort with isort * add github action * enable flake8-docstrings * fix docstrings * add mypy env * no implicit optional * add type for raw * add some type hints
This commit is contained in:
16
tox.ini
16
tox.ini
@@ -22,8 +22,9 @@ deps = jaconv
|
||||
pytest-mock
|
||||
hypothesis>4
|
||||
python-barcode
|
||||
commands = pytest --cov escpos --cov-report=xml
|
||||
commands = pytest
|
||||
passenv = ESCPOS_CAPABILITIES_PICKLE_DIR, ESCPOS_CAPABILITIES_FILE, CI, TRAVIS, TRAVIS_*, APPVEYOR, APPVEYOR_*, CODECOV_*
|
||||
setenv = PY_IGNORE_IMPORTMISMATCH=1
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python
|
||||
@@ -39,7 +40,16 @@ commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
|
||||
|
||||
[testenv:flake8]
|
||||
basepython = python
|
||||
# TODO add flake8-future
|
||||
# TODO add flake8-docstrings
|
||||
deps = flake8
|
||||
flake8-docstrings
|
||||
commands = flake8
|
||||
|
||||
[testenv:mypy]
|
||||
basepython = python
|
||||
deps = mypy
|
||||
types-six
|
||||
types-PyYAML
|
||||
types-appdirs
|
||||
types-Pillow
|
||||
jaconv
|
||||
commands = mypy src
|
||||
|
Reference in New Issue
Block a user