@@ -213,6 +213,7 @@ def brightness(self):
213
213
def brightness (self , value ):
214
214
self .display .brightness = value
215
215
216
+ # pylint: disable=too-many-locals
216
217
def show_business_card (self , * , image_name = None , email_string = None ,
217
218
email_scale = 1 , email_font = terminalio .FONT , dwell = 20 ):
218
219
"""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,
233
234
face_image = displayio .TileGrid (on_disk_bitmap , pixel_shader = displayio .ColorConverter ())
234
235
business_card_splash .append (face_image )
235
236
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 :
237
238
email_group = displayio .Group (scale = email_scale )
238
239
email_label = Label (email_font , text = email_string )
239
240
(_ , _ , width , height ) = email_label .bounding_box
@@ -271,7 +272,6 @@ def show_badge(self, *, background_color=0xFF0000, foreground_color=0xFFFFFF,
271
272
"Blinka".
272
273
273
274
"""
274
- # Make the Display Background
275
275
splash = displayio .Group (max_size = 20 )
276
276
277
277
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,
283
283
x = 0 , y = 0 )
284
284
splash .append (bg_sprite )
285
285
286
- # Draw a Foreground Rectangle where the name goes
287
- # x, y, width, height
288
286
rect = Rect (0 , (int (self .display .height * 0.4 )), self .display .width ,
289
287
(int (self .display .height * 0.5 )), fill = foreground_color )
290
288
splash .append (rect )
0 commit comments