File: mypy.ini

package info (click to toggle)
python3.13 3.13.6-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 121,256 kB
  • sloc: python: 703,743; ansic: 653,888; xml: 31,250; sh: 5,844; cpp: 4,326; makefile: 1,981; objc: 787; lisp: 502; javascript: 213; asm: 75; csh: 12
file content (23 lines) | stat: -rw-r--r-- 735 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[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