(allow_list: list[str])
| 86 | |
| 87 | |
| 88 | def 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 | |
| 102 | def expand_path(path: str) -> str: |
no outgoing calls
no test coverage detected
searching dependent graphs…