Skip to content

Commit

Permalink
fix error when module.__file__ is None in get_module_files
Browse files Browse the repository at this point in the history
  • Loading branch information
R9295 committed Feb 16, 2023
1 parent c233548 commit 7280202
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions panoptisch/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def get_module_files(module: ModuleType) -> List[str]:
entry = module.__file__
except AttributeError:
return [] # frozen module
if entry is None:
return []
if entry.endswith('__init__.py'):
entry_folder = get_file_dir(entry)
return glob.glob(f'{entry_folder}/**/*.py', recursive=True)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "panoptisch"
version = "0.1.6"
version = "0.1.7"
description = "A recursive Python dependency scanner."
authors = ["aarnav <aarnavbos@gmail.com>"]

Expand Down

0 comments on commit 7280202

Please sign in to comment.