Enforce type annotations via mypy --strict

Enforcement added via:
- The repo's Makefile (`make check-mypy` & `make lint`)
- The repo's main GitHub Action
This commit is contained in:
Jeremy Singer-Vine
2022-05-06 09:51:01 -04:00
parent 9587cc7d22
commit cdfdb87a21
3 changed files with 13 additions and 3 deletions
+3
View File
@@ -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
+6 -3
View File
@@ -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
+4
View File
@@ -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