Skip to content

Commit

Permalink
Add --local-partial-types and --strict-bytes to mypy (#4583)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Feb 20, 2025
1 parent 00cb6d1 commit 256f342
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/fuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 256f342

Please sign in to comment.