-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
acceptedReady for implementationReady for implementationbugSomething isn't workingSomething isn't working
Description
Last issue for now!
Ruff only detects in, but it should detect not in as well:
d = {}
if "key" in d.keys():
pass
if "key" not in d.keys():
passRuff output:
$ ruff x.py
x.py:3:4: SIM118 [*] Use `"key" in d` instead of `"key" in d.keys()`
Expected:
x.py:3:4: SIM118 [*] Use `"key" in d` instead of `"key" in d.keys()`
x.py:6:4: SIM118 [*] Use `"key" not in d` instead of `"key" not in d.keys()`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
acceptedReady for implementationReady for implementationbugSomething isn't workingSomething isn't working