From acd2a3d5cd63df9aec86c26edd9194ca4e509284 Mon Sep 17 00:00:00 2001 From: Dan D'Avella Date: Thu, 22 Aug 2024 11:43:09 -0400 Subject: [PATCH] Prevent duplicate codemod catalog entry points (#811) --- src/codemodder/registry.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/codemodder/registry.py b/src/codemodder/registry.py index 650815ca..2f4af598 100644 --- a/src/codemodder/registry.py +++ b/src/codemodder/registry.py @@ -128,7 +128,8 @@ def describe_codemods( def load_registered_codemods(ep_filter: Optional[Callable[[EntryPoint], bool]] = None): registry = CodemodRegistry() logger.debug("loading registered codemod collections") - for entry_point in entry_points().select(group="codemods"): + + for entry_point in set(entry_points().select(group="codemods")): if ep_filter and not ep_filter(entry_point): logger.debug( '- skipping codemod collection "%s" from "%s as requested"',