mirror of
https://github.com/astral-sh/ruff
synced 2026-01-20 21:10:48 -05:00
[refurb] Implement isinstance-type-none (FURB168) (#8308)
## Summary Implement [`no-isinstance-type-none`](https://github.com/dosisod/refurb/blob/master/refurb/checks/builtin/no_isinstance_type_none.py) as `isinstance-type-none` (`FURB168`). Auto-fixes calls to `isinstance` to check if an object is `None` to a `None` identity check. For example, ```python isinstance(foo, type(None)) ``` becomes ```python foo is None ``` Related to #1348. ## Test Plan `cargo test` --------- Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
This commit is contained in:
2
ruff.schema.json
generated
2
ruff.schema.json
generated
@@ -2820,6 +2820,8 @@
|
||||
"FURB140",
|
||||
"FURB145",
|
||||
"FURB148",
|
||||
"FURB16",
|
||||
"FURB168",
|
||||
"FURB17",
|
||||
"FURB171",
|
||||
"FURB177",
|
||||
|
||||
Reference in New Issue
Block a user