Skip to content

Commit

Permalink
Microrefactoring: removed useless var from meet.py (#12025)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Jan 20, 2022
1 parent bb4b534 commit 0cec4f7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mypy/meet.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,15 +508,14 @@ def visit_param_spec(self, t: ParamSpecType) -> ProperType:

def visit_instance(self, t: Instance) -> ProperType:
if isinstance(self.s, Instance):
si = self.s
if t.type == si.type:
if t.type == self.s.type:
if is_subtype(t, self.s) or is_subtype(self.s, t):
# Combine type arguments. We could have used join below
# equivalently.
args: List[Type] = []
# N.B: We use zip instead of indexing because the lengths might have
# mismatches during daemon reprocessing.
for ta, sia in zip(t.args, si.args):
for ta, sia in zip(t.args, self.s.args):
args.append(self.meet(ta, sia))
return Instance(t.type, args)
else:
Expand Down

0 comments on commit 0cec4f7

Please sign in to comment.