Add --local-partial-types and --strict-bytes to mypy (#4583)

This commit is contained in:
sobolevn 2025-02-21 02:27:23 +03:00 committed by GitHub
parent 00cb6d15c5
commit 256f3420b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 2 deletions

View File

@ -39,13 +39,14 @@ repos:
exclude: ^src/blib2to3/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
rev: v1.15.0
hooks:
- id: mypy
exclude: ^(docs/conf.py|scripts/generate_schema.py)$
args: []
additional_dependencies: &mypy_deps
- types-PyYAML
- types-atheris
- tomli >= 0.2.6, < 2.0.0
- click >= 8.1.0, != 8.1.4, != 8.1.5
- packaging >= 22.0

View File

@ -224,6 +224,8 @@ branch = true
python_version = "3.9"
mypy_path = "src"
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.
warn_unreachable = true
implicit_reexport = true

View File

@ -80,7 +80,7 @@ def test_idempotent_any_syntatically_valid_python(
try:
import sys
import atheris # type: ignore[import-not-found]
import atheris
except ImportError:
pass
else: