Skip to content

Commit 59145e0

Browse files
fix that prevents crash
1 parent 76111f0 commit 59145e0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mypy/report.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,9 @@ def on_file(
424424
type_map: dict[Expression, Type],
425425
options: Options,
426426
) -> None:
427+
if os.path.isdir(tree.path): # can happen with namespace packages
428+
return
429+
427430
with open(tree.path) as f:
428431
tree_source = f.readlines()
429432

0 commit comments

Comments
 (0)