Python

Python

Made by DeepSource

Unnecessary None provided as default PTC-W0039

Anti-pattern
Minor
Autofix

It is unnecessary to provide None as the default value when the key is not present in the dictionary as get implicitly returns None.

Not preferred:

value = some_dict.get("key", None)

Preferred:

value = some_dict.get("key")