Skip to content

Commit 6f0914a

Browse files
committed
DM: fix pylint stuff
1 parent cf15aa7 commit 6f0914a

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

adafruit_epd/il0373.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,15 @@ def image(self, image):
183183
for x in iter(range(image.size[0])):
184184
if x == 0:
185185
x = 1
186-
p = pix[x, y]
186+
pixel = pix[x, y]
187187

188188
addr = int(((self.width - x) * self.height + y)/8)
189189

190-
if p == (0xFF, 0, 0):
190+
if pixel == (0xFF, 0, 0):
191191
addr = addr + self.bw_bufsize
192192
current = self.sram.read8(addr)
193193

194-
if p in ((0xFF, 0, 0), (0, 0, 0)):
194+
if pixel in ((0xFF, 0, 0), (0, 0, 0)):
195195
current = current & ~(1 << (7 - y%8))
196196
else:
197197
current = current | (1 << (7 - y%8))

examples/epd_blinka.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
from PIL import Image
2-
from PIL import ImageDraw
3-
from PIL import ImageFont
4-
51
import digitalio
62
import busio
73
import board
4+
5+
from PIL import Image
6+
from PIL import ImageDraw
7+
from PIL import ImageFont
88
from adafruit_epd.epd import Adafruit_EPD
99
from adafruit_epd.il0373 import Adafruit_IL0373
1010

@@ -58,7 +58,8 @@
5858
draw.rectangle((x, top, x+shape_width, bottom), outline=RED, fill=BLACK)
5959
x += shape_width+padding
6060
# Draw a triangle.
61-
draw.polygon([(x, bottom), (x+shape_width/2, top), (x+shape_width, bottom)], outline=BLACK, fill=RED)
61+
draw.polygon([(x, bottom), (x+shape_width/2, top), (x+shape_width, bottom)],
62+
outline=BLACK, fill=RED)
6263
x += shape_width+padding
6364
# Draw an X.
6465
draw.line((x, bottom, x+shape_width, top), fill=RED)
@@ -68,7 +69,8 @@
6869
# Load default font.
6970
font = ImageFont.load_default()
7071

71-
# Alternatively load a TTF font. Make sure the .ttf font file is in the same directory as the python script!
72+
# Alternatively load a TTF font. Make sure the .ttf font
73+
# file is in the same directory as the python script!
7274
# Some other nice fonts to try: http://www.dafont.com/bitmap.php
7375
#font = ImageFont.truetype('Minecraftia.ttf', 8)
7476

@@ -79,4 +81,4 @@
7981
# Display image.
8082
display.image(image)
8183

82-
display.display()
84+
display.display()

0 commit comments

Comments
 (0)