Add --local-partial-types
and --strict-bytes
to mypy (#4583)
This commit is contained in:
parent
00cb6d15c5
commit
256f3420b1
@ -39,13 +39,14 @@ repos:
|
|||||||
exclude: ^src/blib2to3/
|
exclude: ^src/blib2to3/
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
rev: v1.14.1
|
rev: v1.15.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: mypy
|
- id: mypy
|
||||||
exclude: ^(docs/conf.py|scripts/generate_schema.py)$
|
exclude: ^(docs/conf.py|scripts/generate_schema.py)$
|
||||||
args: []
|
args: []
|
||||||
additional_dependencies: &mypy_deps
|
additional_dependencies: &mypy_deps
|
||||||
- types-PyYAML
|
- types-PyYAML
|
||||||
|
- types-atheris
|
||||||
- tomli >= 0.2.6, < 2.0.0
|
- tomli >= 0.2.6, < 2.0.0
|
||||||
- click >= 8.1.0, != 8.1.4, != 8.1.5
|
- click >= 8.1.0, != 8.1.4, != 8.1.5
|
||||||
- packaging >= 22.0
|
- packaging >= 22.0
|
||||||
|
@ -224,6 +224,8 @@ branch = true
|
|||||||
python_version = "3.9"
|
python_version = "3.9"
|
||||||
mypy_path = "src"
|
mypy_path = "src"
|
||||||
strict = true
|
strict = true
|
||||||
|
strict_bytes = true
|
||||||
|
local_partial_types = true
|
||||||
# Unreachable blocks have been an issue when compiling mypyc, let's try to avoid 'em in the first place.
|
# Unreachable blocks have been an issue when compiling mypyc, let's try to avoid 'em in the first place.
|
||||||
warn_unreachable = true
|
warn_unreachable = true
|
||||||
implicit_reexport = true
|
implicit_reexport = true
|
||||||
|
@ -80,7 +80,7 @@ def test_idempotent_any_syntatically_valid_python(
|
|||||||
try:
|
try:
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import atheris # type: ignore[import-not-found]
|
import atheris
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user