Skip to content

Commit 4c2e383

Browse files
authored
Fix regression with empty package names python#4111
1 parent 64c8ca0 commit 4c2e383

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/fastparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ def visit_Import(self, n: ast3.Import) -> Import:
651651
def visit_ImportFrom(self, n: ast3.ImportFrom) -> ImportBase:
652652
assert n.level is not None
653653
if len(n.names) == 1 and n.names[0].name == '*':
654-
assert n.module is not None
654+
assert n.module is not ''
655655
i = ImportAll(n.module, n.level) # type: ImportBase
656656
else:
657657
i = ImportFrom(self.translate_module_id(n.module) if n.module is not None else '',

0 commit comments

Comments
 (0)