Closed janosh closed 1 year ago
dict.get(key) returns None by default if key is missing.
dict.get(key)
None
key
# Bad dict.get(key, None) # Good dict.get(key)
Adding this rule should be coordinated with https://github.com/charliermarsh/ruff/issues/3546 for consistent naming.
I am interested in this issue. Would you mind if I tackle this issue?
In making this rule, what will the SIM number be?
SIM
Go ahead :-) 🙏
The number should be SIM910
Explanation
dict.get(key)
returnsNone
by default ifkey
is missing.Example
Related
Adding this rule should be coordinated with https://github.com/charliermarsh/ruff/issues/3546 for consistent naming.