We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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 astral-sh/ruff#3546 for consistent naming.
The text was updated successfully, but these errors were encountered:
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
Sorry, something went wrong.
Go ahead :-) 🙏
The number should be SIM910
dict.get(key, None)
ENH: Add dict.get(key, None) → dict.get(key) as SIM910 (#173)
21375ea
See https://docs.python.org/3/library/stdtypes.html?highlight=dict#dict.get Closes #171
MartinThoma
Successfully merging a pull request may close this issue.
Explanation
dict.get(key)
returnsNone
by default ifkey
is missing.Example
Related
Adding this rule should be coordinated with astral-sh/ruff#3546 for consistent naming.
The text was updated successfully, but these errors were encountered: