File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -258,20 +258,20 @@ def hopper(mode: str | None = None) -> Image.Image:
258258
259259 if mode is None :
260260 # Always return fresh not-yet-loaded version of image.
261- # Operations on not-yet-loaded images is separate class of errors
262- # what we should catch.
261+ # Operations on not-yet-loaded images are a separate class of errors
262+ # that we should catch.
263263 return Image .open ("Tests/images/hopper.ppm" )
264264
265265 return _cached_hopper (mode ).copy ()
266266
267267
268- @lru_cache ( maxsize = None )
269- def _cached_hopper (mode : str = None ) -> Image .Image :
268+ @lru_cache
269+ def _cached_hopper (mode : str ) -> Image .Image :
270270 if mode == "F" :
271- im = hopper ("L" ). convert ( mode )
271+ im = hopper ("L" )
272272 else :
273- im = hopper (). convert ( mode )
274- return im
273+ im = hopper ()
274+ return im . convert ( mode )
275275
276276
277277def djpeg_available () -> bool :
You can’t perform that action at this time.
0 commit comments