1
0
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:
Patrick Kanzler
2023-08-15 01:03:36 +02:00
committed by GitHub
parent 2b62c8e28d
commit fbabd8ed88
45 changed files with 465 additions and 345 deletions

View File

@@ -30,6 +30,11 @@ jobs:
python -m pip install --upgrade pip
pip install flake8 pytest tox tox-gh-actions
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Check sorting of imports
uses: isort/isort-action@master
with:
requirementsFiles: "requirements.txt doc/requirements.txt"
sortPaths: "./doc ./src ./examples ./test ./setup.py"
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
@@ -50,4 +55,4 @@ jobs:
files: ./coverage.xml,!./cache
flags: unittests
name: coverage-tox-${{ matrix.python-version }}
verbose: true
verbose: true