MCPcopy
hub / github.com/psf/black / _parse_single_version

Function _parse_single_version

src/black/parsing.py:131–140  ·  view source on GitHub ↗
(
    src: str, version: tuple[int, int], *, type_comments: bool
)

Source from the content-addressed store, hash-verified

129
130
131def _parse_single_version(
132 src: str, version: tuple[int, int], *, type_comments: bool
133) -> ast.AST:
134 filename = "<unknown>"
135 with warnings.catch_warnings():
136 warnings.simplefilter("ignore", SyntaxWarning)
137 warnings.simplefilter("ignore", DeprecationWarning)
138 return ast.parse(
139 src, filename, feature_version=version, type_comments=type_comments
140 )
141
142
143def parse_ast(src: str) -> ast.AST:

Callers 1

parse_astFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected