Skip to content

Commit 30eee86

Browse files
refactor: remove redundant None default
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:
1 parent 9e0fe36 commit 30eee86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_shell2http/classes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def cleanup_temp_dir(self, future: Future) -> None:
9999
key: Optional[str] = future.result().get("key", None)
100100
if not key:
101101
return None
102-
tmpdir: Optional[str] = self.__tmpdirs.get(key, None)
102+
tmpdir: Optional[str] = self.__tmpdirs.get(key)
103103
if not tmpdir:
104104
return None
105105

0 commit comments

Comments
 (0)