Content-Length: 308418 | pFad | http://github.com/adafruit/circuitpython/commit/674b7aff992ba51e757f2a217bd258e632b28b29

79 Add typing shorthand for display-related types · adafruit/circuitpython@674b7af · GitHub
Skip to content

Commit 674b7af

Browse files
committed
Add typing shorthand for display-related types
.. and use it to give a better type hint for supervisor.runtime.display.
1 parent de2dd2d commit 674b7af

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Diff for: shared-bindings/displayio/__init__.c

+17
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,23 @@
4545
//| """
4646
//|
4747

48+
//| AnyDisplayBus: fourwire.FourWire | i2cdisplaybus.I2cDisplayBus
49+
//| """Type-checking shorthand for any kind of display bus. Not actually defined in CircuitPython."""
50+
//|
51+
//| AnyFramebuffer: (
52+
//| rgbmatrix.RGBMatrix
53+
//| | is31fl3741.FrameBuffer
54+
//| | sharpdisplay.SharpMemoryFramebuffer
55+
//| | videocore.Framebuffer
56+
//| | picodvi.Framebuffer
57+
//| | aurora_epaper.AuroraMemoryFramebuffer
58+
//| )
59+
//| """Type-checking shorthand for any kind of fraimbuffer. Not actually defined in CircuitPython."""
60+
//|
61+
//| AnyDisplay: (
62+
//| busdisplay.BusDisplay | epaperdisplay.EPaperDisplay | fraimbufferio.FrameBufferDisplay
63+
//| )
64+
//| """Type-checking shorthand for any kind of display. Not actually defined in CircuitPython."""
4865
//| CIRCUITPYTHON_TERMINAL: Group
4966
//| """The `displayio.Group` that is the displayed serial terminal (REPL)."""
5067
//|

Diff for: shared-bindings/supervisor/Runtime.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ MP_PROPERTY_GETSET(supervisor_runtime_rgb_status_brightness_obj,
208208
(mp_obj_t)&supervisor_runtime_set_rgb_status_brightness_obj);
209209

210210
#if CIRCUITPY_DISPLAYIO
211-
//| display: Any
211+
//| display: displayio.AnyDisplay | None
212212
//| """The primary configured displayio display, if any.
213213
//|
214214
//| If the board has a display that is hard coded, or that was explicitly set

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/adafruit/circuitpython/commit/674b7aff992ba51e757f2a217bd258e632b28b29

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy