From 7ffd66163f4f22364c34d7935734bb54003bd9a9 Mon Sep 17 00:00:00 2001 From: Julien Malard-Adam Date: Sat, 14 Dec 2024 11:12:26 +0530 Subject: [PATCH] Oops --- src/installer/utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/installer/utils.py b/src/installer/utils.py index 35289bb..ff73bdb 100644 --- a/src/installer/utils.py +++ b/src/installer/utils.py @@ -237,14 +237,14 @@ def parse_entrypoints(text: str) -> Iterable[tuple[str, str, str, "ScriptSection assert ":" in value module, attrs = [x.strip() for x in value.split(":", 1)] - assert module.isidentifier(), f"{module} is not a valid identifier" + assert all( + x.isidentifier() for x in module.split(".") + ), f"{module} are not all valid identifiers" # TODO: make this a proper error, which can be caught. assert len(attrs), "Attributes are empty" - assert all( - x.isidentifier() for x in attrs.split(".") - ), f"{attrs} are not all valid identifiers" - + assert attrs.isidentifier(), f"{attrs} is not a valid identifier" + script_section = cast("ScriptSection", section[: -len("_scripts")]) yield name, module, attrs, script_section