Skip to content

Commit

Permalink
fix: Do not crawl tests folder when importing modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefano Moia committed Aug 28, 2023
1 parent 8b71abf commit bed6d38
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions phys2cvr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

__all__ = []
for loader, module_name, is_pkg in pkgutil.walk_packages(__path__):
__all__.append(module_name)
_module = loader.find_module(module_name).load_module(module_name)
globals()[module_name] = _module
if "tests" not in module_name:
__all__.append(module_name)
_module = loader.find_module(module_name).load_module(module_name)
globals()[module_name] = _module

0 comments on commit bed6d38

Please sign in to comment.