Skip to content

Commit 320d2b8

Browse files
committed
Lintly.
1 parent 20f9448 commit 320d2b8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

adafruit_pybadger.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ def brightness(self):
213213
def brightness(self, value):
214214
self.display.brightness = value
215215

216+
# pylint: disable=too-many-locals
216217
def show_business_card(self, *, image_name=None, email_string=None,
217218
email_scale=1, email_font=terminalio.FONT, dwell=20):
218219
"""Display a bitmap image and a text string, such as a personal image and email address.
@@ -233,7 +234,7 @@ def show_business_card(self, *, image_name=None, email_string=None,
233234
face_image = displayio.TileGrid(on_disk_bitmap, pixel_shader=displayio.ColorConverter())
234235
business_card_splash.append(face_image)
235236
self.display.wait_for_frame()
236-
if email_string is not None and len(email_string) > 0:
237+
if email_string is not None and email_string:
237238
email_group = displayio.Group(scale=email_scale)
238239
email_label = Label(email_font, text=email_string)
239240
(_, _, width, height) = email_label.bounding_box
@@ -271,7 +272,6 @@ def show_badge(self, *, background_color=0xFF0000, foreground_color=0xFFFFFF,
271272
"Blinka".
272273
273274
"""
274-
# Make the Display Background
275275
splash = displayio.Group(max_size=20)
276276

277277
color_bitmap = displayio.Bitmap(self.display.width, self.display.height, 1)
@@ -283,8 +283,6 @@ def show_badge(self, *, background_color=0xFF0000, foreground_color=0xFFFFFF,
283283
x=0, y=0)
284284
splash.append(bg_sprite)
285285

286-
# Draw a Foreground Rectangle where the name goes
287-
# x, y, width, height
288286
rect = Rect(0, (int(self.display.height * 0.4)), self.display.width,
289287
(int(self.display.height * 0.5)), fill=foreground_color)
290288
splash.append(rect)

0 commit comments

Comments
 (0)