Skip to content

Commit

Permalink
_top_level_inferred: Handle dist.files being None
Browse files Browse the repository at this point in the history
Fixes python#344.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Loading branch information
andersk committed Aug 26, 2021
1 parent b21bff6 commit 81cc147
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion importlib_metadata/__init__.py
Expand Up @@ -1023,6 +1023,6 @@ def _top_level_declared(dist):
def _top_level_inferred(dist):
return {
f.parts[0] if len(f.parts) > 1 else f.with_suffix('').name
for f in dist.files
for f in dist.files or []
if f.suffix == ".py"
}

0 comments on commit 81cc147

Please sign in to comment.