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 0ae3b8d commit 96569b4Copy full SHA for 96569b4
mypy/expandtype.py
@@ -231,7 +231,7 @@ def visit_type_var(self, t: TypeVarType) -> Type:
231
t = t.copy_modified(upper_bound=t.upper_bound.accept(self))
232
repl = self.variables.get(t.id, t)
233
234
- if has_type_vars(repl) and not isinstance(repl, TypeVarType):
+ if has_type_vars(repl) and not isinstance(repl, (TypeVarType, Instance)):
235
if repl in self.recursive_guard or isinstance(repl, (TypeVarType, CallableType)):
236
return repl
237
self.recursive_guard.add(repl)
0 commit comments