1[mypy] 2files = Tools/peg_generator/pegen 3pretty = True 4show_traceback = True 5 6# Make sure the peg_generator can be run using Python 3.10: 7python_version = 3.10 8 9# Be strict... 10strict = True 11warn_unreachable = True 12enable_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. 18warn_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.*] 23disable_error_code = redundant-expr 24