MCPcopy Index your code
hub / github.com/python/mypy / dump

Function dump

misc/dump-ast.py:17–24  ·  view source on GitHub ↗
(fname: str, python_version: tuple[int, int], quiet: bool = False)

Source from the content-addressed store, hash-verified

15
16
17def dump(fname: str, python_version: tuple[int, int], quiet: bool = False) -> None:
18 options = Options()
19 options.python_version = python_version
20 with open(fname, "rb") as f:
21 s = f.read()
22 tree = parse(s, fname, None, errors=Errors(options), options=options, file_exists=True)
23 if not quiet:
24 print(tree)
25
26
27def main() -> None:

Callers 1

mainFunction · 0.85

Calls 5

OptionsClass · 0.90
parseFunction · 0.90
ErrorsClass · 0.90
printFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…