4949//| Most people should not use this class directly. Use a specific display driver instead that will
5050//| contain the initialization sequence at minimum."""
5151//|
52- //| def __init__(self, display_bus: Any , init_sequence: buffer, *, width: int, height: int, colstart: int = 0, rowstart: int = 0, rotation: int = 0, color_depth: int = 16, grayscale: bool = False, pixels_in_byte_share_row: bool = True, bytes_per_cell: int = 1, reverse_pixels_in_byte: bool = False, set_column_command: int = 0x2a, set_row_command: int = 0x2b, write_ram_command: int = 0x2c, set_vertical_scroll: int = 0, backlight_pin: microcontroller.Pin = None, brightness_command: int = None, brightness: bool = 1.0, auto_brightness: bool = False, single_byte_bounds: bool = False, data_as_commands: bool = False, auto_refresh: bool = True, native_frames_per_second: int = 60):
52+ //| def __init__(self, display_bus: displayio , init_sequence: buffer, *, width: int, height: int, colstart: int = 0, rowstart: int = 0, rotation: int = 0, color_depth: int = 16, grayscale: bool = False, pixels_in_byte_share_row: bool = True, bytes_per_cell: int = 1, reverse_pixels_in_byte: bool = False, set_column_command: int = 0x2a, set_row_command: int = 0x2b, write_ram_command: int = 0x2c, set_vertical_scroll: int = 0, backlight_pin: microcontroller.Pin = None, brightness_command: int = None, brightness: bool = 1.0, auto_brightness: bool = False, single_byte_bounds: bool = False, data_as_commands: bool = False, auto_refresh: bool = True, native_frames_per_second: int = 60):
5353//| r"""Create a Display object on the given display bus (`displayio.FourWire` or `displayio.ParallelBus`).
5454//|
5555//| The ``init_sequence`` is bitpacked to minimize the ram impact. Every command begins with a
@@ -188,7 +188,7 @@ static displayio_display_obj_t* native_display(mp_obj_t display_obj) {
188188 return MP_OBJ_TO_PTR (native_display );
189189}
190190
191- //| def show(self, group: Group) -> Any :
191+ //| def show(self, group: Group) -> None :
192192//| """Switches to displaying the given group of layers. When group is None, the default
193193//| CircuitPython terminal will be shown.
194194//|
@@ -210,7 +210,7 @@ STATIC mp_obj_t displayio_display_obj_show(mp_obj_t self_in, mp_obj_t group_in)
210210}
211211MP_DEFINE_CONST_FUN_OBJ_2 (displayio_display_show_obj , displayio_display_obj_show );
212212
213- //| def refresh(self, *, target_frames_per_second: int = 60, minimum_frames_per_second: int = 1) -> Any :
213+ //| def refresh(self, *, target_frames_per_second: int = 60, minimum_frames_per_second: int = 1) -> bool :
214214//| """When auto refresh is off, waits for the target frame rate and then refreshes the display,
215215//| returning True. If the call has taken too long since the last refresh call for the given
216216//| target frame rate, then the refresh returns False immediately without updating the screen to
@@ -245,7 +245,7 @@ STATIC mp_obj_t displayio_display_obj_refresh(size_t n_args, const mp_obj_t *pos
245245}
246246MP_DEFINE_CONST_FUN_OBJ_KW (displayio_display_refresh_obj , 1 , displayio_display_obj_refresh );
247247
248- //| auto_refresh: Any = ...
248+ //| auto_refresh: None = ...
249249//| """True when the display is refreshed automatically."""
250250//|
251251STATIC mp_obj_t displayio_display_obj_get_auto_refresh (mp_obj_t self_in ) {
@@ -270,7 +270,7 @@ const mp_obj_property_t displayio_display_auto_refresh_obj = {
270270 (mp_obj_t )& mp_const_none_obj },
271271};
272272
273- //| brightness: Any = ...
273+ //| brightness: float = ...
274274//| """The brightness of the display as a float. 0.0 is off and 1.0 is full brightness. When
275275//| `auto_brightness` is True, the value of `brightness` will change automatically.
276276//| If `brightness` is set, `auto_brightness` will be disabled and will be set to False."""
@@ -307,7 +307,7 @@ const mp_obj_property_t displayio_display_brightness_obj = {
307307 (mp_obj_t )& mp_const_none_obj },
308308};
309309
310- //| auto_brightness: Any = ...
310+ //| auto_brightness: Optional[bool] = ...
311311//| """True when the display brightness is adjusted automatically, based on an ambient
312312//| light sensor or other method. Note that some displays may have this set to True by default,
313313//| but not actually implement automatic brightness adjustment. `auto_brightness` is set to False
@@ -338,7 +338,7 @@ const mp_obj_property_t displayio_display_auto_brightness_obj = {
338338
339339
340340
341- //| width: Any = ...
341+ //| width: int = ...
342342//| Gets the width of the board
343343//|
344344//|
@@ -355,7 +355,7 @@ const mp_obj_property_t displayio_display_width_obj = {
355355 (mp_obj_t )& mp_const_none_obj },
356356};
357357
358- //| height: Any = ...
358+ //| height: int = ...
359359//| """Gets the height of the board"""
360360//|
361361//|
@@ -372,7 +372,7 @@ const mp_obj_property_t displayio_display_height_obj = {
372372 (mp_obj_t )& mp_const_none_obj },
373373};
374374
375- //| rotation: Any = ...
375+ //| rotation: Optional[int] = ...
376376//| """The rotation of the display as an int in degrees."""
377377//|
378378STATIC mp_obj_t displayio_display_obj_get_rotation (mp_obj_t self_in ) {
@@ -395,7 +395,7 @@ const mp_obj_property_t displayio_display_rotation_obj = {
395395 (mp_obj_t )& mp_const_none_obj },
396396};
397397
398- //| bus: Any = ...
398+ //| bus: displayio = ...
399399//| """The bus being used by the display"""
400400//|
401401//|
@@ -413,7 +413,7 @@ const mp_obj_property_t displayio_display_bus_obj = {
413413};
414414
415415
416- //| def fill_row(self, y: int, buffer: bytearray ) -> Any :
416+ //| def fill_row(self, y: int, buffer: WriteableBuffer ) -> bytearray :
417417//| """Extract the pixels from a single row
418418//|
419419//| :param int y: The top edge of the area
0 commit comments