(directory: Path, suffixes: tuple[str, ...] = (".py",))
| 3481 | return names |
| 3482 | |
| 3483 | def _is_python_package_dir(directory: Path, suffixes: tuple[str, ...] = (".py",)) -> bool: |
| 3484 | if any( |
| 3485 | (directory / f"__init__{suffix}").is_file() |
| 3486 | and effective_suffix(directory / f"__init__{suffix}") in suffixes |
| 3487 | for suffix in suffixes |
| 3488 | ): |
| 3489 | return True |
| 3490 | return any( |
| 3491 | (directory / f"__init__{suffix}").is_file() |
| 3492 | for suffix in _declared_language_suffixes(suffixes) |
| 3493 | if suffix not in suffixes |
| 3494 | ) |
| 3495 | |
| 3496 | |
| 3497 | def _probe_declared_python_module_candidate(candidate: Path) -> Path | None: |
no test coverage detected