From 8b3eb652804fe77ceedf62dda495251c1c07d991 Mon Sep 17 00:00:00 2001 From: fynnbe Date: Fri, 29 Nov 2024 11:40:28 +0100 Subject: [PATCH] include module in node title to avoid conflicts --- bioimageio/spec/_internal/node.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bioimageio/spec/_internal/node.py b/bioimageio/spec/_internal/node.py index 0afa98d7..921d7519 100644 --- a/bioimageio/spec/_internal/node.py +++ b/bioimageio/spec/_internal/node.py @@ -17,12 +17,12 @@ from .validation_context import ValidationContext, validation_context_var -def _node_title_generator(model: Type[Node]) -> str: +def _node_title_generator(node: Type[Node]) -> str: return ( - f"{model.implemented_type} {model.implemented_format_version}" # pyright: ignore[reportAttributeAccessIssue] - if hasattr(model, "implemented_type") - and hasattr(model, "implemented_format_version") - else model.__name__ + f"{node.implemented_type} {node.implemented_format_version}" # pyright: ignore[reportAttributeAccessIssue] + if hasattr(node, "implemented_type") + and hasattr(node, "implemented_format_version") + else f"{node.__module__.replace('bioimageio.spec.', '')}.{node.__name__}" )