Skip to content

Commit

Permalink
fix(cli): fix incorrectly handled module paths in CLI (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
akonarski-ds authored Oct 16, 2024
1 parent 17d7b3d commit 6423feb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/ragbits-cli/src/ragbits/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ def main() -> None:

cli_enabled_modules = [
module
for i, module in enumerate(pkgutil.iter_modules(ragbits.__path__))
if module.ispkg and module.name != "cli" and (Path(ragbits.__path__[i]) / module.name / "cli.py").exists()
for module in pkgutil.iter_modules(ragbits.__path__)
if module.ispkg
and module.name != "cli"
and (Path(module.module_finder.path) / module.name / "cli.py").exists() # type: ignore
]

for module in cli_enabled_modules:
register_func = importlib.import_module(f"ragbits.{module.name}.cli").register
register_func(app, help_only)
Expand Down

0 comments on commit 6423feb

Please sign in to comment.