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 41e59ac commit 244ad9eCopy full SHA for 244ad9e
mypy/checker.py
@@ -8176,10 +8176,12 @@ def conditional_types(
8176
8177
Returns a 2-tuple:
8178
The first element is the proposed type, if the expression can be the proposed type.
8179
+ (or default, if default is set and the expression is a subtype of the proposed type).
8180
The second element is the type it would hold if it was not the proposed type, if any.
8181
+ (or default, if default is set and the expression is not a subtype of the proposed type).
8182
+
8183
UninhabitedType means unreachable.
8184
None means no new information can be inferred.
- If default is set it is returned instead.
8185
"""
8186
if proposed_type_ranges:
8187
if len(proposed_type_ranges) == 1:
0 commit comments