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 244ad9e commit 4a51dedCopy full SHA for 4a51ded
mypy/checker.py
@@ -8194,8 +8194,7 @@ def conditional_types(
8194
current_type = try_expanding_sum_type_to_union(current_type, enum_name)
8195
proposed_items = [type_range.item for type_range in proposed_type_ranges]
8196
proposed_type = make_simplified_union(proposed_items)
8197
- current_type = get_proper_type(current_type)
8198
- if isinstance(current_type, AnyType):
+ if isinstance(get_proper_type(current_type), AnyType):
8199
return proposed_type, current_type
8200
elif isinstance(proposed_type, AnyType):
8201
# We don't really know much about the proposed type, so we shouldn't
0 commit comments