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 0bcf1dd commit a4f1685Copy full SHA for a4f1685
mypy/checker.py
@@ -8001,8 +8001,10 @@ def conditional_types(
8001
If default is set it is returned instead.
8002
"""
8003
if proposed_type_ranges is None:
8004
+ # An isinstance check, but we don't understand the type
8005
return current_type, default
8006
if not proposed_type_ranges:
8007
+ # This is the case for `if isinstance(x, ())` which always returns False.
8008
return UninhabitedType(), default
8009
8010
if len(proposed_type_ranges) == 1:
0 commit comments