feat(release): synthesize initial catalog entries
Some checks failed
Dependency Audit / dependency-audit (push) Failing after 14s
Security Audit / security-audit (push) Failing after 12s

This commit is contained in:
2026-07-22 04:56:36 +02:00
parent d53db2da06
commit 8ecf8770ab
6 changed files with 525 additions and 10 deletions

View File

@@ -331,6 +331,11 @@ def import_source_path(path: Path, *, module: str | None, level: int) -> Path |
if src_root is None or module is None:
return None
candidate = src_root.joinpath(*module.split(".")).with_suffix(".py")
if not candidate.exists():
top_level = module.split(".", 1)[0]
workspace = src_root.parent.parent
sibling_src = workspace / top_level.replace("_", "-") / "src"
candidate = sibling_src.joinpath(*module.split(".")).with_suffix(".py")
if candidate.exists():
return candidate
init = candidate.with_suffix("") / "__init__.py"