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.
--strict-equality
None
1 parent 116b92b commit ccd5179Copy full SHA for ccd5179
mypy/checkexpr.py
@@ -3817,7 +3817,7 @@ def dangerous_comparison(
3817
#
3818
# TODO: find a way of disabling the check only for types resulted from the expansion.
3819
return False
3820
- if isinstance(left, NoneType) or isinstance(right, NoneType):
+ if isinstance(left, NoneType) and isinstance(right, NoneType):
3821
3822
if isinstance(left, UnionType) and isinstance(right, UnionType):
3823
left = remove_optional(left)
0 commit comments