mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-13 05:06:49 +03:00
Changed string formatting
This commit is contained in:
parent
4fa3016d67
commit
a94bd13791
|
@ -1796,7 +1796,7 @@ class Image(object):
|
||||||
):
|
):
|
||||||
message = "Unknown resampling filter ({}).".format(resample)
|
message = "Unknown resampling filter ({}).".format(resample)
|
||||||
|
|
||||||
filters = [filter[1]+" (%d)" % filter[0] for filter in (
|
filters = ["{} ({})".format(filter[1], filter[0]) for filter in (
|
||||||
(NEAREST, "Image.NEAREST"),
|
(NEAREST, "Image.NEAREST"),
|
||||||
(LANCZOS, "Image.LANCZOS"),
|
(LANCZOS, "Image.LANCZOS"),
|
||||||
(BILINEAR, "Image.BILINEAR"),
|
(BILINEAR, "Image.BILINEAR"),
|
||||||
|
@ -2281,9 +2281,9 @@ class Image(object):
|
||||||
LANCZOS: "Image.LANCZOS/Image.ANTIALIAS"
|
LANCZOS: "Image.LANCZOS/Image.ANTIALIAS"
|
||||||
}[resample]+" ({}) cannot be used.".format(resample)
|
}[resample]+" ({}) cannot be used.".format(resample)
|
||||||
else:
|
else:
|
||||||
message = "Unknown resampling filter ("+str(resample)+")."
|
message = "Unknown resampling filter ({}).".format(resample)
|
||||||
|
|
||||||
filters = [filter[1]+" (%d)" % filter[0] for filter in (
|
filters = ["{} ({})".format(filter[1], filter[0]) for filter in (
|
||||||
(NEAREST, "Image.NEAREST"),
|
(NEAREST, "Image.NEAREST"),
|
||||||
(BILINEAR, "Image.BILINEAR"),
|
(BILINEAR, "Image.BILINEAR"),
|
||||||
(BICUBIC, "Image.BICUBIC")
|
(BICUBIC, "Image.BICUBIC")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user