Skip to content

Commit 5ed68ef

Browse files
committed
chore: minor touchup
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 72432fd commit 5ed68ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/scikit_build_core/build/_pathutil.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ def scantree(path: Path) -> Generator[Path, None, None]:
2828

2929

3030
def path_to_module(path: Path) -> str:
31-
path = path.with_name(path.name.split(".", 1)[0])
31+
name, _, _ = path.name.partition(".")
32+
assert name, f"Empty name should be filtered by is_valid_module first, got {path}"
33+
path = path.with_name(name)
3234
if path.name == "__init__":
3335
path = path.parent
3436
return ".".join(path.parts)

0 commit comments

Comments
 (0)