Skip to content

Commit

Permalink
Fixed missing *-expansion in iter_submodules()
Browse files Browse the repository at this point in the history
  • Loading branch information
timbernat committed Jul 18, 2024
1 parent baeaf4e commit 01eac4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion polymerist/genutils/importutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def iter_submodule_info(module : ModuleType, recursive : bool=True, blacklist :

def iter_submodules(module : ModuleType, recursive : bool=True, blacklist : Optional[Iterable[str]]=None) -> Generator[ModuleType, None, None]:
'''Generate all submodules of a given module. If the "recursive" flag is set, will generate ALL possible submodules in the tree recursively'''
for submodule, _submodule_info in iter_submodule_info(module, recursive=recursive, blacklist=blacklist):
for submodule, *_submodule_info in iter_submodule_info(module, recursive=recursive, blacklist=blacklist):
yield submodule # only yield submodule; for more compact iteration


Expand Down

0 comments on commit 01eac4e

Please sign in to comment.