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

Function validate_package_allow_list

mypy/config_parser.py:88–99  ·  view source on GitHub ↗
(allow_list: list[str])

Source from the content-addressed store, hash-verified

86
87
88def validate_package_allow_list(allow_list: list[str]) -> list[str]:
89 for p in allow_list:
90 msg = f"Invalid allow list entry: {p}"
91 if "*" in p:
92 raise argparse.ArgumentTypeError(
93 f"{msg} (entries are already prefixes so must not contain *)"
94 )
95 if "\\" in p or "/" in p:
96 raise argparse.ArgumentTypeError(
97 f"{msg} (entries must be packages like foo.bar not directories or files)"
98 )
99 return allow_list
100
101
102def expand_path(path: str) -> str:

Callers 2

process_optionsFunction · 0.90
config_parser.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…