We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
meet.py
1 parent bb4b534 commit 0cec4f7Copy full SHA for 0cec4f7
mypy/meet.py
@@ -508,15 +508,14 @@ def visit_param_spec(self, t: ParamSpecType) -> ProperType:
508
509
def visit_instance(self, t: Instance) -> ProperType:
510
if isinstance(self.s, Instance):
511
- si = self.s
512
- if t.type == si.type:
+ if t.type == self.s.type:
513
if is_subtype(t, self.s) or is_subtype(self.s, t):
514
# Combine type arguments. We could have used join below
515
# equivalently.
516
args: List[Type] = []
517
# N.B: We use zip instead of indexing because the lengths might have
518
# mismatches during daemon reprocessing.
519
- for ta, sia in zip(t.args, si.args):
+ for ta, sia in zip(t.args, self.s.args):
520
args.append(self.meet(ta, sia))
521
return Instance(t.type, args)
522
else:
0 commit comments