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

Function parse_pkgs

mypy/test/testpep561.py:162–167  ·  view source on GitHub ↗
(comment: str)

Source from the content-addressed store, hash-verified

160
161
162def parse_pkgs(comment: str) -> tuple[list[str], list[str]]:
163 if not comment.startswith("# pkgs:"):
164 return ([], [])
165 else:
166 pkgs_str, *args = comment[7:].split(";")
167 return ([pkg.strip() for pkg in pkgs_str.split(",")], [arg.strip() for arg in args])
168
169
170def parse_mypy_args(line: str) -> list[str]:

Callers 1

test_pep561Function · 0.85

Calls 3

splitMethod · 0.80
stripMethod · 0.80
startswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…