| 1 |
[mypy] |
| 2 |
files = Tools/peg_generator/pegen |
| 3 |
pretty = True |
| 4 |
show_traceback = True |
| 5 |
|
| 6 |
# Make sure the peg_generator can be run using Python 3.10: |
| 7 |
python_version = 3.10 |
| 8 |
|
| 9 |
# Be strict... |
| 10 |
strict = True |
| 11 |
warn_unreachable = True |
| 12 |
enable_error_code = truthy-bool,ignore-without-code,redundant-expr |
| 13 |
|
| 14 |
# This causes *many* false positives on the peg_generator |
| 15 |
# due to pegen.grammar.GrammarVisitor returning Any from visit() and generic_visit(). |
| 16 |
# It would be possible to workaround the false positives using asserts, |
| 17 |
# but it would be pretty tedious, and probably isn't worth it. |
| 18 |
warn_return_any = False |
| 19 |
|
| 20 |
# Not all of the strictest settings can be enabled |
| 21 |
# on generated Python code yet: |
| 22 |
[mypy-pegen.grammar_parser.*] |
| 23 |
disable_error_code = redundant-expr |