Skip to content

Commit 33bd243

Browse files
committed
try removing extra quotes around types
1 parent e77144d commit 33bd243

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

circuitpython_typing/__init__.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
# Protocol was introduced in Python 3.8, TypeAlias in 3.10
2121
from typing_extensions import Protocol, TypeAlias
2222

23+
# pylint: disable=used-before-assignment
2324
if TYPE_CHECKING:
2425
import alarm
2526
import audiocore
@@ -51,17 +52,17 @@
5152
bytearray,
5253
bytes,
5354
memoryview,
54-
"rgbmatrix.RGBMatrix",
55-
"ulab.numpy.ndarray",
55+
rgbmatrix.RGBMatrix,
56+
ulab.numpy.ndarray,
5657
]
5758
"""Classes that implement the readable buffer protocol."""
5859

5960
WriteableBuffer: TypeAlias = Union[
6061
array.array,
6162
bytearray,
6263
memoryview,
63-
"rgbmatrix.RGBMatrix",
64-
"ulab.numpy.ndarray",
64+
rgbmatrix.RGBMatrix,
65+
ulab.numpy.ndarray,
6566
]
6667
"""Classes that implement the writeable buffer protocol."""
6768

@@ -143,20 +144,20 @@ def ioctl(self, operation: int, arg: Optional[int] = None) -> Optional[int]:
143144
# These types may not be in adafruit-blinka, so use the string form instead of a resolved name.
144145

145146
AudioSample: TypeAlias = Union[
146-
"audiocore.WaveFile",
147-
"audiocore.RawSample",
148-
"audiomixer.Mixer",
149-
"audiomp3.MP3Decoder",
150-
"synthio.MidiTrack",
147+
audiocore.WaveFile,
148+
audiocore.RawSample,
149+
audiomixer.Mixer,
150+
audiomp3.MP3Decoder,
151+
synthio.MidiTrack,
151152
]
152153
"""Classes that implement the audiosample protocol.
153154
You can play these back with `audioio.AudioOut`, `audiobusio.I2SOut` or `audiopwmio.PWMAudioOut`.
154155
"""
155156

156-
FrameBuffer: TypeAlias = Union["rgbmatrix.RGBMatrix"]
157+
FrameBuffer: TypeAlias = Union[rgbmatrix.RGBMatrix]
157158
"""Classes that implement the framebuffer protocol."""
158159

159-
Alarm: TypeAlias = Union["alarm.pin.PinAlarm", "alarm.time.TimeAlarm"]
160+
Alarm: TypeAlias = Union[alarm.pin.PinAlarm, alarm.time.TimeAlarm]
160161
"""Classes that implement alarms for sleeping and asynchronous notification.
161162
You can use these alarms to wake up from light or deep sleep.
162163
"""

0 commit comments

Comments
 (0)