File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -95,16 +95,16 @@ def _write_pixels(
95
95
if saving_bitmap :
96
96
# pixel_source: Bitmap
97
97
for x in range (width ):
98
- pixel = pixel_source [x , y - 1 ] # type: ignore
99
- color = palette [pixel ] # type: ignore # handled by save_pixel's guardians
98
+ pixel = pixel_source [x , y - 1 ]
99
+ color = palette [pixel ] # handled by save_pixel's guardians
100
100
for _ in range (3 ):
101
101
row_buffer [buffer_index ] = color & 0xFF
102
102
color >>= 8
103
103
buffer_index += 1
104
104
else :
105
105
# pixel_source: Display
106
106
result_buffer = bytearray (2048 )
107
- data = pixel_source .fill_row (y - 1 , result_buffer ) # type: ignore
107
+ data = pixel_source .fill_row (y - 1 , result_buffer )
108
108
for i in range (width ):
109
109
pixel565 = (data [i * 2 ] << 8 ) + data [i * 2 + 1 ]
110
110
for b in _rgb565_to_bgr_tuple (pixel565 ):
@@ -133,7 +133,7 @@ def save_pixels(
133
133
:param palette: the Palette to use for looking up colors in the bitmap
134
134
"""
135
135
if not pixel_source :
136
- if "DISPLAY" not in dir (board ):
136
+ if not hasattr (board , "DISPLAY" ):
137
137
raise ValueError ("Second argument must be a Bitmap or Display" )
138
138
pixel_source = board .DISPLAY
139
139
You can’t perform that action at this time.
0 commit comments