Skip common files that are not needed in the zip file.
(path: Path)
| 20 | """ |
| 21 | |
| 22 | def _should_skip(path: Path) -> bool: |
| 23 | """Skip common files that are not needed in the zip file.""" |
| 24 | name = path.name |
| 25 | |
| 26 | if path.is_dir() and name in ("__pycache__", "dist"): |
| 27 | return True |
| 28 | |
| 29 | if path.is_dir() and name.endswith((".egg-info", ".dist-info")): |
| 30 | return True |
| 31 | |
| 32 | if path.is_file() and name in ( |
| 33 | "LICENSE", |
| 34 | "LICENSE.txt", |
| 35 | "setup.py", |
| 36 | ".gitignore", |
| 37 | ): |
| 38 | return True |
| 39 | |
| 40 | if path.is_file() and name.endswith(("pyi", "toml", "cfg", "md", "rst")): |
| 41 | return True |
| 42 | |
| 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} |
no outgoing calls
no test coverage detected
searching dependent graphs…