Skip to content

Commit

Permalink
Deduplicate input module names in gen_linkml.translate_defs()
Browse files Browse the repository at this point in the history
  • Loading branch information
candleindark committed Aug 12, 2024
1 parent 12bf5d2 commit eae46d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pydantic2linkml/gen_linkml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,10 @@ def translate_defs(module_names) -> SchemaDefinition:
:return: A `SchemaDefinition` object representing the expressions of the
Python objects in LinkML
"""
# Eliminate duplicates in the module names
if type(module_names) is not set:
module_names = set(module_names)

modules = get_all_modules(module_names)
logger.info(
"Considering %d modules for provided %d modules: %s",
Expand Down

0 comments on commit eae46d6

Please sign in to comment.