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
When removing a key from a dictionary, there's no need to check for its existence, as the end results will be the same anyway. Thus, dict.pop(key, None) is preferred.
Explanation
When removing a key from a dictionary, there's no need to check for its existence, as the end results will be the same anyway. Thus,
dict.pop(key, None)
is preferred.Also see this issue at @astral-sh/ruff.
Example
The text was updated successfully, but these errors were encountered: