From 4c2e383d4df529e51c2794c5ee887d1cbd87591f Mon Sep 17 00:00:00 2001 From: Andrei Date: Fri, 13 Oct 2017 15:27:28 +0200 Subject: [PATCH] Fix regression with empty package names #4111 --- mypy/fastparse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/fastparse.py b/mypy/fastparse.py index cb1eeba02c20..0498a21a327d 100644 --- a/mypy/fastparse.py +++ b/mypy/fastparse.py @@ -651,7 +651,7 @@ def visit_Import(self, n: ast3.Import) -> Import: def visit_ImportFrom(self, n: ast3.ImportFrom) -> ImportBase: assert n.level is not None if len(n.names) == 1 and n.names[0].name == '*': - assert n.module is not None + assert n.module is not '' i = ImportAll(n.module, n.level) # type: ImportBase else: i = ImportFrom(self.translate_module_id(n.module) if n.module is not None else '',