We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3aa9472 commit 8882c80Copy full SHA for 8882c80
mypy/checkexpr.py
@@ -5275,9 +5275,15 @@ def fast_dict_type(self, e: DictExpr) -> Type | None:
5275
ctx = self.type_context[-1]
5276
if ctx:
5277
return None
5278
+
5279
+ if self.chk.current_node_deferred:
5280
+ # Guarantees that all items will be Any, we'll reject it anyway.
5281
+ return None
5282
5283
rt = self.resolved_type.get(e, None)
5284
if rt is not None:
5285
return rt if isinstance(rt, Instance) else None
5286
5287
keys: list[Type] = []
5288
values: list[Type] = []
5289
stargs: tuple[Type, Type] | None = None
0 commit comments