You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
smackesey
changed the title
Special case E721 (use isinstance instead of type comparison) for type(None)
[feature-request] Special case E721 (use isinstance instead of type comparison) for type(None)Dec 5, 2022
squiddy
added a commit
to squiddy/ruff
that referenced
this issue
Dec 24, 2022
Comparison to
type(None)
occasionally comes up in our codebase:This raises a ruff/flake8 error:
E721 Do not compare types, use isinstance()
.IMO this rule should not apply for comparisons to
type(None)
, since the "correct" form implied by the rule looks very odd:I think this weirdness is unique to
type(None)
.The text was updated successfully, but these errors were encountered: