diff --git a/aiida/orm/nodes/process/calculation/calcjob.py b/aiida/orm/nodes/process/calculation/calcjob.py index eebeb9034e..6ae1f91184 100644 --- a/aiida/orm/nodes/process/calculation/calcjob.py +++ b/aiida/orm/nodes/process/calculation/calcjob.py @@ -71,12 +71,16 @@ def tools(self) -> 'CalculationTools': entry_point = get_entry_point_from_string(entry_point_string) try: - tools_class = load_entry_point('aiida.tools.calculations', entry_point.name) + tools_class = load_entry_point( + 'aiida.tools.calculations', + entry_point.name # type: ignore[attr-defined] + ) self._tools = tools_class(self) except exceptions.EntryPointError as exception: self._tools = CalculationTools(self) + entry_point_name = entry_point.name # type: ignore[attr-defined] self.logger.warning( - f'could not load the calculation tools entry point {entry_point.name}: {exception}' + f'could not load the calculation tools entry point {entry_point_name}: {exception}' ) return self._tools diff --git a/aiida/plugins/entry_point.py b/aiida/plugins/entry_point.py index b4414735d4..9c05291e2b 100644 --- a/aiida/plugins/entry_point.py +++ b/aiida/plugins/entry_point.py @@ -309,7 +309,7 @@ def get_entry_point_string_from_class(class_module: str, class_name: str) -> Opt group, entry_point = get_entry_point_from_class(class_module, class_name) if group and entry_point: - return ENTRY_POINT_STRING_SEPARATOR.join([group, entry_point.name]) + return ENTRY_POINT_STRING_SEPARATOR.join([group, entry_point.name]) # type: ignore[attr-defined] return None