Skip to content

Commit

Permalink
Use None as default instead of dictionary
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo van Kemenade <[email protected]>
  • Loading branch information
radarhere and hugovk authored Jan 20, 2024
1 parent f7701e6 commit 13f626f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Tests/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,12 @@ def tostring(im: Image.Image, string_format: str, **options: dict[str, Any]) ->
return out.getvalue()


def hopper(mode: str | None = None, cache: dict[str, Image.Image] = {}) -> Image.Image:
def hopper(
mode: str | None = None, cache: dict[str, Image.Image] | None = None
) -> Image.Image:
if cache is None:
cache = {}

if mode is None:
# Always return fresh not-yet-loaded version of image.
# Operations on not-yet-loaded images is separate class of errors
Expand Down

0 comments on commit 13f626f

Please sign in to comment.