Skip to content

Commit

Permalink
Fix assign to type
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed Dec 31, 2022
1 parent 0743392 commit 6ac6aaf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mypy/subtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,8 @@ def visit_type_var(self, left: TypeVarType) -> bool:
return True
if left.values and self._is_subtype(UnionType.make_union(left.values), right):
return True
if left.has_default():
return self._is_subtype(left.default, self.right)
return self._is_subtype(left.upper_bound, self.right)

def visit_param_spec(self, left: ParamSpecType) -> bool:
Expand Down

0 comments on commit 6ac6aaf

Please sign in to comment.