Skip to content

Commit c849b3f

Browse files
authored
still more pylint fixes
1 parent 0f1b9a2 commit c849b3f

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

EInk_Autostereograms/code.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def run_job(jobfile):
219219
try:
220220
out = open(config["asgfolder"] + "/asg" + job["image"], mode="wb")
221221
print("writing to file asg" + job["image"])
222-
except (OSError):
222+
except OSError:
223223
# readonly filesystem, do not create file
224224
createfile = False
225225
if createfile: # == True
@@ -280,21 +280,21 @@ def run_job(jobfile):
280280
offset = 0
281281
if x >= 22 and (
282282
x < (image.width + panelwidth // 2)
283-
and y < image.height
284-
and (
285-
(image[x - panelwidth // 2, y] != 0 and not inv
286-
) or (
287-
image[x - panelwidth // 2, y] == 0 and inv)
288-
)):
289-
# offset = 4
290-
if job["imagegrayscale"] == 0:
291-
offset = job["imageheight"]
292-
else:
293-
offset = (
294-
image[x - panelwidth // 2, y]
295-
* job["grayscalecolors"]
296-
// 255
297-
)
283+
and y < image.height
284+
and (
285+
(image[x - panelwidth // 2, y] != 0 and not inv
286+
) or (
287+
image[x - panelwidth // 2, y] == 0 and inv)
288+
)):
289+
# offset = 4
290+
if job["imagegrayscale"] == 0:
291+
offset = job["imageheight"]
292+
else:
293+
offset = (
294+
image[x - panelwidth // 2, y]
295+
* job["grayscalecolors"]
296+
// 255
297+
)
298298
if offset != 0:
299299
for x2 in range(x, display.width, panelwidth):
300300
tcanvas[x2] = tcanvas[x2 + offset]
@@ -346,8 +346,8 @@ def run_job(jobfile):
346346
continue
347347
print("Button #%d pressed" % button)
348348
if button == 1:
349-
for job in config["jobs"]:
350-
run_job(job)
349+
for jobname in config["jobs"]:
350+
run_job(jobname)
351351
if button == 2:
352352
show_files()
353353
time.sleep(0.01)

0 commit comments

Comments
 (0)