From 9a8e3082eaca817318efcb9465b2c395f983e3a3 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Tue, 10 Oct 2023 03:47:12 +0100 Subject: [PATCH] This seems cleaner --- aiida/plugins/entry_point.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/aiida/plugins/entry_point.py b/aiida/plugins/entry_point.py index 4cf74ab7cd..168c38490d 100644 --- a/aiida/plugins/entry_point.py +++ b/aiida/plugins/entry_point.py @@ -349,13 +349,8 @@ def get_entry_point_from_class(class_module: str, class_name: str) -> Tuple[Opti :return: a tuple of the corresponding group and entry point or None if not found """ for entry_point in eps(): - - if entry_point.module != class_module: - continue - - if entry_point.attr == class_name: + if entry_point.module == class_module and entry_point.attr == class_name: return entry_point.group, entry_point - return None, None