@@ -262,9 +262,7 @@ def __init__(
262262 # Add the two arrow triangles, if required
263263
264264 if (arrow_color is not None ) or (arrow_outline is not None ):
265-
266265 if horizontal : # horizontal orientation, add left and right arrows
267-
268266 if (
269267 (arrow_width is not None )
270268 and (arrow_height is not None )
@@ -304,7 +302,6 @@ def __init__(
304302 )
305303 )
306304 else : # vertical orientation, add upper and lower arrows
307-
308305 if (
309306 (arrow_height is not None )
310307 and (arrow_width is not None )
@@ -345,13 +342,11 @@ def __init__(
345342
346343 # Draw function to update the current value
347344 def _update_value (self , new_value : int , animate : bool = True ) -> None :
348-
349345 if (
350346 (self ._animation_time is not None )
351347 and (self ._animation_time > 0 ) # If animation is required
352348 and (animate )
353349 ):
354-
355350 if ((new_value - self .value ) == 1 ) or (
356351 (self .value == (len (self .value_list ) - 1 )) and (new_value == 0 )
357352 ): # wrap around
@@ -553,7 +548,6 @@ def _draw_position(
553548 position : float = 0.0 ,
554549 horizontal : bool = True ,
555550) -> None :
556-
557551 x_offset1 = bitmap1_offset [0 ]
558552 y_offset1 = bitmap1_offset [1 ]
559553 x_offset2 = bitmap2_offset [0 ]
@@ -598,6 +592,7 @@ def _draw_position(
598592
599593# pylint: disable=invalid-name
600594
595+
601596# _blit_constrained: Copies bitmaps with constraints to the dimensions
602597def _blit_constrained (
603598 target : displayio .Bitmap ,
@@ -662,7 +657,6 @@ def _animate_bitmap(
662657 animation_time : float ,
663658 horizontal : bool ,
664659) -> None :
665-
666660 start_time = time .monotonic ()
667661
668662 if start_position > end_position : # direction is decreasing: "out"
@@ -686,7 +680,6 @@ def _animate_bitmap(
686680 display .auto_refresh = True
687681
688682 while True :
689-
690683 this_time = time .monotonic ()
691684 target_position = (
692685 start_position
@@ -709,7 +702,6 @@ def _animate_bitmap(
709702 )
710703 display .auto_refresh = True
711704 else :
712-
713705 _draw_position (
714706 target_bitmap ,
715707 bitmap1 ,
0 commit comments