Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions shared-bindings/displayio/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,23 @@
//| """
//|

//| AnyDisplayBus: fourwire.FourWire | i2cdisplaybus.I2cDisplayBus
//| """Type-checking shorthand for any kind of display bus. Not actually defined in CircuitPython."""
//|
//| AnyFramebuffer: (
Copy link

@elpekenin elpekenin Mar 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this should be

Suggested change
//| AnyFramebuffer: (
//| AnyFramebuffer = (

As in... AnyFramebuffer is any of these types, not an instance of them


On a quick check in a blank file

foo: int | float
bar: foo  # Variable not allowed in type expression (by pylance extension on VSCode)
foo = int | float
bar: foo  # nothing reported

PS: Same thing applies below

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! This is a mistake I commonly make.

//| rgbmatrix.RGBMatrix
//| | is31fl3741.FrameBuffer
//| | sharpdisplay.SharpMemoryFramebuffer
//| | videocore.Framebuffer
//| | picodvi.Framebuffer
//| | aurora_epaper.AuroraMemoryFramebuffer
//| )
//| """Type-checking shorthand for any kind of framebuffer. Not actually defined in CircuitPython."""
//|
//| AnyDisplay: (
//| busdisplay.BusDisplay | epaperdisplay.EPaperDisplay | framebufferio.FrameBufferDisplay
//| )
//| """Type-checking shorthand for any kind of display. Not actually defined in CircuitPython."""
//| CIRCUITPYTHON_TERMINAL: Group
//| """The `displayio.Group` that is the displayed serial terminal (REPL)."""
//|
Expand Down
4 changes: 2 additions & 2 deletions shared-bindings/supervisor/Runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,12 @@ MP_PROPERTY_GETSET(supervisor_runtime_rgb_status_brightness_obj,
(mp_obj_t)&supervisor_runtime_set_rgb_status_brightness_obj);

#if CIRCUITPY_DISPLAYIO
//| display: Any
//| display: displayio.AnyDisplay | None
//| """The primary configured displayio display, if any.
//|
//| If the board has a display that is hard coded, or that was explicitly set
//| in boot.py or code.py (including a previous run of code.py), it is
//| available here until it is released with ``displayio.releasee_displays()``.
//| available here until it is released with ``displayio.release_displays()``.
//|
//| The display can be of any supported display type, such as `busdisplay.BusDisplay`.
//|
Expand Down
Loading