(path: Path | str, names: list[str])
| 43 | return False |
| 44 | |
| 45 | def filterfunc(path: Path | str, names: list[str]) -> set[str]: |
| 46 | filtered_files = {(root / f).resolve() for f in excludes} |
| 47 | |
| 48 | # We have JS implementations of these modules, so we don't need to |
| 49 | # include the Python ones. Checking the name of the root directory |
| 50 | # is a bit of a hack, but it works... |
| 51 | if root.name.startswith("python3"): |
| 52 | filtered_files.update({root / f for f in stubs}) |
| 53 | |
| 54 | path = Path(path).resolve() |
| 55 | |
| 56 | if _should_skip(path): |
| 57 | return set(names) |
| 58 | |
| 59 | _names = [] |
| 60 | for name in names: |
| 61 | fullpath = path / name |
| 62 | |
| 63 | if _should_skip(fullpath) or fullpath in filtered_files: |
| 64 | if verbose: |
| 65 | print(f"Skipping {fullpath}") |
| 66 | |
| 67 | _names.append(name) |
| 68 | |
| 69 | return set(_names) |
| 70 | |
| 71 | return filterfunc |
| 72 |
searching dependent graphs…