Skip to content

Commit 9e615b6

Browse files
committed
Add noqas for UP031
1 parent 307d00b commit 9e615b6

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

Tests/bench_cffi_access.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_direct():
4545

4646
assert caccess[(0, 0)] == access[(0, 0)]
4747

48-
print("Size: %sx%s" % im.size)
48+
print("Size: %sx%s" % im.size) # noqa: UP031
4949
timer(iterate_get, "PyAccess - get", im.size, access)
5050
timer(iterate_set, "PyAccess - set", im.size, access)
5151
timer(iterate_get, "C-api - get", im.size, caccess)

src/PIL/EpsImagePlugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def Ghostscript(tile, size, fp, scale=1, transparency=False):
122122
gs_binary,
123123
"-q", # quiet mode
124124
"-g%dx%d" % size, # set output geometry (pixels)
125-
"-r%fx%f" % res, # set input DPI (dots per inch)
125+
"-r%fx%f" % res, # set input DPI (dots per inch) # noqa: UP031
126126
"-dBATCH", # exit after processing
127127
"-dNOPAUSE", # don't pause between pages
128128
"-dSAFER", # safe mode

src/PIL/IcnsImagePlugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def _accept(prefix):
392392
imf = IcnsImageFile(fp)
393393
for size in imf.info["sizes"]:
394394
imf.size = size
395-
imf.save("out-%s-%s-%s.png" % size)
395+
imf.save("out-%s-%s-%s.png" % size) # noqa: UP031
396396
with Image.open(sys.argv[1]) as im:
397397
im.save("out.png")
398398
if sys.platform == "windows":

src/PIL/Image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3100,7 +3100,7 @@ def fromarray(obj, mode=None):
31003100
try:
31013101
mode, rawmode = _fromarray_typemap[typekey]
31023102
except KeyError as e:
3103-
msg = "Cannot handle this data type: %s, %s" % typekey
3103+
msg = "Cannot handle this data type: %s, %s" % typekey # noqa: UP031
31043104
raise TypeError(msg) from e
31053105
else:
31063106
rawmode = mode

src/PIL/PdfParser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class IndirectReference(
8282
collections.namedtuple("IndirectReferenceTuple", ["object_id", "generation"])
8383
):
8484
def __str__(self):
85-
return "%s %s R" % self
85+
return "%s %s R" % self # noqa: UP031
8686

8787
def __bytes__(self):
8888
return self.__str__().encode("us-ascii")
@@ -103,7 +103,7 @@ def __hash__(self):
103103

104104
class IndirectObjectDef(IndirectReference):
105105
def __str__(self):
106-
return "%s %s obj" % self
106+
return "%s %s obj" % self # noqa: UP031
107107

108108

109109
class XrefTable:

0 commit comments

Comments
 (0)