Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 025e3de

Browse files
authored
A hot fix for crash in internal repos (#4927)
1 parent 09b802e commit 025e3de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mypy/fixup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,10 @@ def lookup_qualified_stnode(modules: Dict[str, MypyFile], name: str,
263263
while True:
264264
if '.' not in head:
265265
if not quick_and_dirty:
266-
assert '.' in head, "Cannot find %s" % (name,)
266+
# Not yet: assert '.' in head, "Cannot find %s" % (name,)
267+
stale = stale_info(modules)
268+
stale.fallback_to_any = True
269+
return SymbolTableNode(GDEF, stale)
267270
return None
268271
head, tail = head.rsplit('.', 1)
269272
rest.append(tail)

0 commit comments

Comments
 (0)