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 1c4e237 commit ab926ebCopy full SHA for ab926eb
mypy/constraints.py
@@ -403,9 +403,8 @@ def _infer_constraints(
403
404
# Check if any actual items are NOT subtypes of the non-type-var part
405
compatible_items = []
406
- actual_proper = get_proper_type(actual)
407
- if isinstance(actual_proper, UnionType):
408
- for actual_item in actual_proper.items:
+ if isinstance(actual, UnionType):
+ for actual_item in actual.items:
409
if not mypy.subtypes.is_subtype(actual_item, non_type_var):
410
compatible_items.append(actual_item)
411
0 commit comments