mirror of
https://github.com/jsvine/pdfplumber.git
synced 2026-08-29 16:40:24 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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,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
|
||||
|
||||
Reference in New Issue
Block a user