mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Check types with mypy
This commit is contained in:
parent
fac2b6e413
commit
b8605eaa84
6
.github/workflows/lint.yml
vendored
6
.github/workflows/lint.yml
vendored
|
@ -2,6 +2,9 @@ name: Lint
|
|||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 1
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
|
@ -46,3 +49,6 @@ jobs:
|
|||
run: tox -e lint
|
||||
env:
|
||||
PRE_COMMIT_COLOR: always
|
||||
|
||||
- name: Mypy
|
||||
run: tox -e mypy
|
||||
|
|
|
@ -125,3 +125,34 @@ known-first-party = ["PIL"]
|
|||
[tool.pytest.ini_options]
|
||||
addopts = "-ra --color=yes"
|
||||
testpaths = ["Tests"]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.8"
|
||||
pretty = true
|
||||
disallow_any_generics = true
|
||||
enable_error_code = "ignore-without-code"
|
||||
extra_checks = true
|
||||
follow_imports = "silent"
|
||||
warn_redundant_casts = true
|
||||
warn_unreachable = true
|
||||
warn_unused_ignores = true
|
||||
exclude = [
|
||||
'^src/PIL/_tkinter_finder.py$',
|
||||
'^src/PIL/DdsImagePlugin.py$',
|
||||
'^src/PIL/FpxImagePlugin.py$',
|
||||
'^src/PIL/Image.py$',
|
||||
'^src/PIL/ImageCms.py$',
|
||||
'^src/PIL/ImageFile.py$',
|
||||
'^src/PIL/ImageFont.py$',
|
||||
'^src/PIL/ImageMath.py$',
|
||||
'^src/PIL/ImageMorph.py$',
|
||||
'^src/PIL/ImageQt.py$',
|
||||
'^src/PIL/ImageShow.py$',
|
||||
'^src/PIL/ImImagePlugin.py$',
|
||||
'^src/PIL/MicImagePlugin.py$',
|
||||
'^src/PIL/PdfParser.py$',
|
||||
'^src/PIL/PyAccess.py$',
|
||||
'^src/PIL/TiffImagePlugin.py$',
|
||||
'^src/PIL/TiffTags.py$',
|
||||
'^src/PIL/WebPImagePlugin.py$',
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user