Skip to content

Commit c879b9f

Browse files
authored
pythongh-108455: Simplify the peg_generator mypy config (python#108620)
make it easier to see exactly which options from mypy's `--strict` mode can't currently be enabled
1 parent ecb2bf0 commit c879b9f

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

Tools/peg_generator/mypy.ini

+8-18
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
11
[mypy]
22
files = Tools/peg_generator/pegen
33
pretty = True
4+
show_traceback = True
45

5-
follow_imports = error
6-
no_implicit_optional = True
7-
strict_optional = True
8-
9-
#check_untyped_defs = True
10-
disallow_untyped_calls = True
11-
disallow_untyped_defs = True
12-
13-
disallow_any_generics = true
14-
disallow_any_unimported = True
15-
disallow_incomplete_defs = True
16-
disallow_subclassing_any = True
6+
# Make sure the peg_generator can be run using Python 3.10:
7+
python_version = 3.10
178

18-
warn_unused_configs = True
19-
warn_unused_ignores = true
20-
warn_redundant_casts = true
21-
warn_no_return = True
9+
# Be strict...
10+
strict = True
2211

23-
show_traceback = True
24-
show_error_codes = True
12+
# except for a few settings that can't yet be enabled:
13+
warn_return_any = False
14+
no_implicit_reexport = False
2515

2616
[mypy-pegen.grammar_parser]
2717
strict_optional = False

0 commit comments

Comments
 (0)