File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 28
28
29
29
30
30
try :
31
+ # Used only for typing
31
32
from typing import Optional , Type
32
33
from types import TracebackType
34
+ import microcontroller
33
35
except ImportError :
34
36
pass
35
37
36
38
37
- import microcontroller
38
-
39
-
40
39
__version__ = "0.0.0-auto.0"
41
40
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel.git"
42
41
@@ -150,7 +149,7 @@ def __init__(
150
149
self .pin = digitalio .DigitalInOut (pin )
151
150
self .pin .direction = digitalio .Direction .OUTPUT
152
151
153
- def deinit (self ):
152
+ def deinit (self ) -> None :
154
153
"""Blank out the NeoPixels and release the pin."""
155
154
self .fill (0 )
156
155
self .show ()
@@ -173,17 +172,17 @@ def __repr__(self):
173
172
return "[" + ", " .join ([str (x ) for x in self ]) + "]"
174
173
175
174
@property
176
- def n (self ):
175
+ def n (self ) -> int :
177
176
"""
178
177
The number of neopixels in the chain (read-only)
179
178
"""
180
179
return len (self )
181
180
182
- def write (self ):
181
+ def write (self ) -> None :
183
182
""".. deprecated: 1.0.0
184
183
185
184
Use ``show`` instead. It matches Micro:Bit and Arduino APIs."""
186
185
self .show ()
187
186
188
- def _transmit (self , buffer : bytearray ):
187
+ def _transmit (self , buffer : bytearray ) -> None :
189
188
neopixel_write (self .pin , buffer )
You can’t perform that action at this time.
0 commit comments