@@ -317,9 +317,9 @@ def __init__(
317
317
self .append (self ._screen_tilegrid )
318
318
self .append (self ._corner_tilegrid )
319
319
320
- self ._pointer = None
321
- self ._circle_palette = None
322
- self .plot_line_point : Optional [ List [Tuple [int , int ]]] = None
320
+ self ._pointer : Optional [ vectorio . Circle ] = None
321
+ self ._circle_palette : Optional [ displayio . Palette ] = None
322
+ self .plot_line_point : List [Tuple [int , int ]] = []
323
323
324
324
@staticmethod
325
325
def _get_font_height (font : terminalio .FONT , scale : int ) -> Tuple [int , int ]:
@@ -449,9 +449,6 @@ def _draw_pointers(self, x: int, y: int) -> None:
449
449
450
450
self ._circle_palette = displayio .Palette (1 )
451
451
452
- # mypy, _circle_palette can't be None at this point
453
- assert self ._circle_palette is not None
454
-
455
452
self ._circle_palette [0 ] = self ._pointer_color
456
453
self ._pointer = vectorio .Circle (
457
454
radius = self ._pointer_radius , x = x , y = y , pixel_shader = self ._circle_palette
@@ -591,8 +588,6 @@ def update_pointer(self, x: int, y: int) -> None:
591
588
:return: None
592
589
rtype: None
593
590
"""
594
- # mypy, plot_line_point can't be None at this point
595
- assert self .plot_line_point is not None
596
591
597
592
self ._add_point (x , y )
598
593
if not self ._pointer :
@@ -616,8 +611,6 @@ def add_plot_line(self, x: int, y: int) -> None:
616
611
617
612
rtype: None
618
613
"""
619
- # mypy, plot_line_point can't be None at this point
620
- assert self .plot_line_point is not None
621
614
622
615
self ._add_point (x , y )
623
616
if len (self .plot_line_point ) > 1 :
@@ -641,5 +634,5 @@ def clear_plot_lines(self, palette_index: int = 5) -> None:
641
634
642
635
rtype: None
643
636
"""
644
- self .plot_line_point = None
637
+ self .plot_line_point = []
645
638
self ._plot_bitmap .fill (palette_index )
0 commit comments