2020-04-22 19:29:27 -03:00
|
|
|
[mypy]
|
2023-08-28 17:04:12 -03:00
|
|
|
files = Tools/peg_generator/pegen
|
|
|
|
pretty = True
|
2023-08-29 07:24:06 -03:00
|
|
|
show_traceback = True
|
2020-04-22 19:29:27 -03:00
|
|
|
|
2023-08-29 07:24:06 -03:00
|
|
|
# Make sure the peg_generator can be run using Python 3.10:
|
|
|
|
python_version = 3.10
|
2020-04-22 19:29:27 -03:00
|
|
|
|
2023-08-29 07:24:06 -03:00
|
|
|
# Be strict...
|
|
|
|
strict = True
|
2023-09-08 18:05:40 -03:00
|
|
|
warn_unreachable = True
|
|
|
|
enable_error_code = truthy-bool,ignore-without-code,redundant-expr
|
2020-04-22 19:29:27 -03:00
|
|
|
|
2023-09-08 18:05:40 -03:00
|
|
|
# This causes *many* false positives on the peg_generator
|
|
|
|
# due to pegen.grammar.GrammarVisitor returning Any from visit() and generic_visit().
|
|
|
|
# It would be possible to workaround the false positives using asserts,
|
|
|
|
# but it would be pretty tedious, and probably isn't worth it.
|
2023-08-29 07:24:06 -03:00
|
|
|
warn_return_any = False
|
2023-09-08 18:05:40 -03:00
|
|
|
|
|
|
|
# Not all of the strictest settings can be enabled
|
|
|
|
# on generated Python code yet:
|
|
|
|
[mypy-pegen.grammar_parser.*]
|
|
|
|
disable_error_code = redundant-expr
|