mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Add noqas for UP031
This commit is contained in:
parent
307d00b44d
commit
9e615b6ad3
|
@ -45,7 +45,7 @@ def test_direct():
|
|||
|
||||
assert caccess[(0, 0)] == access[(0, 0)]
|
||||
|
||||
print("Size: %sx%s" % im.size)
|
||||
print("Size: %sx%s" % im.size) # noqa: UP031
|
||||
timer(iterate_get, "PyAccess - get", im.size, access)
|
||||
timer(iterate_set, "PyAccess - set", im.size, access)
|
||||
timer(iterate_get, "C-api - get", im.size, caccess)
|
||||
|
|
|
@ -122,7 +122,7 @@ def Ghostscript(tile, size, fp, scale=1, transparency=False):
|
|||
gs_binary,
|
||||
"-q", # quiet mode
|
||||
"-g%dx%d" % size, # set output geometry (pixels)
|
||||
"-r%fx%f" % res, # set input DPI (dots per inch)
|
||||
"-r%fx%f" % res, # set input DPI (dots per inch) # noqa: UP031
|
||||
"-dBATCH", # exit after processing
|
||||
"-dNOPAUSE", # don't pause between pages
|
||||
"-dSAFER", # safe mode
|
||||
|
|
|
@ -392,7 +392,7 @@ if __name__ == "__main__":
|
|||
imf = IcnsImageFile(fp)
|
||||
for size in imf.info["sizes"]:
|
||||
imf.size = size
|
||||
imf.save("out-%s-%s-%s.png" % size)
|
||||
imf.save("out-%s-%s-%s.png" % size) # noqa: UP031
|
||||
with Image.open(sys.argv[1]) as im:
|
||||
im.save("out.png")
|
||||
if sys.platform == "windows":
|
||||
|
|
|
@ -3100,7 +3100,7 @@ def fromarray(obj, mode=None):
|
|||
try:
|
||||
mode, rawmode = _fromarray_typemap[typekey]
|
||||
except KeyError as e:
|
||||
msg = "Cannot handle this data type: %s, %s" % typekey
|
||||
msg = "Cannot handle this data type: %s, %s" % typekey # noqa: UP031
|
||||
raise TypeError(msg) from e
|
||||
else:
|
||||
rawmode = mode
|
||||
|
|
|
@ -82,7 +82,7 @@ class IndirectReference(
|
|||
collections.namedtuple("IndirectReferenceTuple", ["object_id", "generation"])
|
||||
):
|
||||
def __str__(self):
|
||||
return "%s %s R" % self
|
||||
return "%s %s R" % self # noqa: UP031
|
||||
|
||||
def __bytes__(self):
|
||||
return self.__str__().encode("us-ascii")
|
||||
|
@ -103,7 +103,7 @@ class IndirectReference(
|
|||
|
||||
class IndirectObjectDef(IndirectReference):
|
||||
def __str__(self):
|
||||
return "%s %s obj" % self
|
||||
return "%s %s obj" % self # noqa: UP031
|
||||
|
||||
|
||||
class XrefTable:
|
||||
|
|
Loading…
Reference in New Issue
Block a user