/
githubmirror
/
cpython
Обзор
Документация
Войти
/
githubmirror
/
cpython
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
Tools/peg_generator/mypy.ini
23 строки
735 B
Alex Waygood
gh-108455: peg_generator: enable mypy's `--warn-unreachable` setting and `redundant-expr` error code (#109160)
09 сен 2023, 00:05
Не верифицирован
09 сен 2023, 00:05
697c9dc
Код
Авторство
О чём код?
[mypy] files = Tools/peg_generator/pegen pretty = True show_traceback = True # Make sure the peg_generator can be run using Python 3.10: python_version = 3.10 # Be strict... strict = True warn_unreachable = True enable_error_code = truthy-bool,ignore-without-code,redundant-expr # 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. warn_return_any = False # Not all of the strictest settings can be enabled # on generated Python code yet: [mypy-pegen.grammar_parser.*] disable_error_code = redundant-expr