diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a43f49f..51af4a3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,6 +35,9 @@ jobs: - name: Validate against flake8 run: python -m flake8 pdfplumber tests + - name: Check type annotations via mypy + run: python -m mypy --strict pdfplumber + test: needs: lint runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index dd32b02..373ac23 100644 --- a/Makefile +++ b/Makefile @@ -17,13 +17,16 @@ check-black: ${PYTHON} -m black --check pdfplumber tests check-isort: - ${PYTHON} -m isort --check-only pdfplumber tests + ${PYTHON} -m isort --profile black --check-only pdfplumber tests check-flake: ${PYTHON} -m flake8 pdfplumber tests -lint: check-flake check-black check-isort +check-mypy: + ${PYTHON} -m mypy --strict pdfplumber + +lint: check-flake check-mypy check-black check-isort format: ${PYTHON} -m black pdfplumber tests - ${PYTHON} -m isort pdfplumber tests + ${PYTHON} -m isort --profile black pdfplumber tests diff --git a/requirements-dev.txt b/requirements-dev.txt index 903ba1b..ccfdb15 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,3 +4,7 @@ pytest-parallel==0.1.1 flake8==4.0.1 black==22.3.0 isort==5.10.1 +pandas==1.4.2 +mypy==0.942 +pandas-stubs==1.2.0.58 +types-Pillow==9.0.14