4747//| objects in CircuitPython, Display objects live until `displayio.release_displays()`
4848//| is called. This is done so that CircuitPython can use the display itself."""
4949//|
50- //| def __init__(self, framebuffer: Any , *, rotation: int = 0, auto_refresh: bool = True):
50+ //| def __init__(self, framebuffer: framebuffer , *, rotation: int = 0, auto_refresh: bool = True):
5151//| """Create a Display object with the given framebuffer (a buffer, array, ulab.array, etc)
5252//|
5353//| :param framebuffer: The framebuffer that the display is connected to
@@ -94,7 +94,7 @@ static framebufferio_framebufferdisplay_obj_t* native_display(mp_obj_t display_o
9494 return MP_OBJ_TO_PTR (native_display );
9595}
9696
97- //| def show(self, group: Group) -> Any :
97+ //| def show(self, group: Group) -> None :
9898//| """Switches to displaying the given group of layers. When group is None, the default
9999//| CircuitPython terminal will be shown.
100100//|
@@ -116,7 +116,7 @@ STATIC mp_obj_t framebufferio_framebufferdisplay_obj_show(mp_obj_t self_in, mp_o
116116}
117117MP_DEFINE_CONST_FUN_OBJ_2 (framebufferio_framebufferdisplay_show_obj , framebufferio_framebufferdisplay_obj_show );
118118
119- //| def refresh(self, *, target_frames_per_second: int = 60, minimum_frames_per_second: int = 1) -> Any :
119+ //| def refresh(self, *, target_frames_per_second: int = 60, minimum_frames_per_second: int = 1) -> bool :
120120//| """When auto refresh is off, waits for the target frame rate and then refreshes the display,
121121//| returning True. If the call has taken too long since the last refresh call for the given
122122//| target frame rate, then the refresh returns False immediately without updating the screen to
@@ -151,7 +151,7 @@ STATIC mp_obj_t framebufferio_framebufferdisplay_obj_refresh(size_t n_args, cons
151151}
152152MP_DEFINE_CONST_FUN_OBJ_KW (framebufferio_framebufferdisplay_refresh_obj , 1 , framebufferio_framebufferdisplay_obj_refresh );
153153
154- //| auto_refresh: Any = ...
154+ //| auto_refresh: Optional[bool] = ...
155155//| """True when the display is refreshed automatically."""
156156//|
157157STATIC mp_obj_t framebufferio_framebufferdisplay_obj_get_auto_refresh (mp_obj_t self_in ) {
@@ -176,7 +176,7 @@ const mp_obj_property_t framebufferio_framebufferdisplay_auto_refresh_obj = {
176176 (mp_obj_t )& mp_const_none_obj },
177177};
178178
179- //| brightness: Any = ...
179+ //| brightness: Optional[float] = ...
180180//| """The brightness of the display as a float. 0.0 is off and 1.0 is full brightness. When
181181//| `auto_brightness` is True, the value of `brightness` will change automatically.
182182//| If `brightness` is set, `auto_brightness` will be disabled and will be set to False."""
@@ -213,7 +213,7 @@ const mp_obj_property_t framebufferio_framebufferdisplay_brightness_obj = {
213213 (mp_obj_t )& mp_const_none_obj },
214214};
215215
216- //| auto_brightness: Any = ...
216+ //| auto_brightness: Optional[bool] = ...
217217//| """True when the display brightness is adjusted automatically, based on an ambient
218218//| light sensor or other method. Note that some displays may have this set to True by default,
219219//| but not actually implement automatic brightness adjustment. `auto_brightness` is set to False
@@ -244,7 +244,7 @@ const mp_obj_property_t framebufferio_framebufferdisplay_auto_brightness_obj = {
244244 (mp_obj_t )& mp_const_none_obj },
245245};
246246
247- //| width: Any = ...
247+ //| width: int = ...
248248//| """Gets the width of the framebuffer"""
249249//|
250250STATIC mp_obj_t framebufferio_framebufferdisplay_obj_get_width (mp_obj_t self_in ) {
@@ -260,7 +260,7 @@ const mp_obj_property_t framebufferio_framebufferdisplay_width_obj = {
260260 (mp_obj_t )& mp_const_none_obj },
261261};
262262
263- //| height: Any = ...
263+ //| height: int = ...
264264//| """Gets the height of the framebuffer"""
265265//|
266266STATIC mp_obj_t framebufferio_framebufferdisplay_obj_get_height (mp_obj_t self_in ) {
@@ -276,7 +276,7 @@ const mp_obj_property_t framebufferio_framebufferdisplay_height_obj = {
276276 (mp_obj_t )& mp_const_none_obj },
277277};
278278
279- //| rotation: Any = ...
279+ //| rotation: Optional[int] = ...
280280//| """The rotation of the display as an int in degrees."""
281281//|
282282STATIC mp_obj_t framebufferio_framebufferdisplay_obj_get_rotation (mp_obj_t self_in ) {
@@ -299,7 +299,7 @@ const mp_obj_property_t framebufferio_framebufferdisplay_rotation_obj = {
299299 (mp_obj_t )& mp_const_none_obj },
300300};
301301
302- //| framebuffer: Any = ...
302+ //| framebuffer: framebuffer = ...
303303//| """The framebuffer being used by the display"""
304304//|
305305//|
@@ -317,7 +317,7 @@ const mp_obj_property_t framebufferio_framebufferframebuffer_obj = {
317317};
318318
319319
320- //| def fill_row(self, y: int, buffer: bytearray ) -> Any :
320+ //| def fill_row(self, y: int, buffer: ReadableBuffer ) -> displayio :
321321//| """Extract the pixels from a single row
322322//|
323323//| :param int y: The top edge of the area
0 commit comments