Skip to content

Microrefactoring: removed useless var from meet.py #12025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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