Skip to content

Commit

Permalink
Prevent duplicate codemod catalog entry points (#811)
Browse files Browse the repository at this point in the history
  • Loading branch information
drdavella authored Aug 22, 2024
1 parent 0ccbe27 commit acd2a3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/codemodder/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"',
Expand Down

0 comments on commit acd2a3d

Please sign in to comment.