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 2828
2929
3030try :
31+ # Used only for typing
3132 from typing import Optional , Type
3233 from types import TracebackType
34+ import microcontroller
3335except ImportError :
3436 pass
3537
3638
37- import microcontroller
38-
39-
4039__version__ = "0.0.0-auto.0"
4140__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel.git"
4241
@@ -150,7 +149,7 @@ def __init__(
150149 self .pin = digitalio .DigitalInOut (pin )
151150 self .pin .direction = digitalio .Direction .OUTPUT
152151
153- def deinit (self ):
152+ def deinit (self ) -> None :
154153 """Blank out the NeoPixels and release the pin."""
155154 self .fill (0 )
156155 self .show ()
@@ -173,17 +172,17 @@ def __repr__(self):
173172 return "[" + ", " .join ([str (x ) for x in self ]) + "]"
174173
175174 @property
176- def n (self ):
175+ def n (self ) -> int :
177176 """
178177 The number of neopixels in the chain (read-only)
179178 """
180179 return len (self )
181180
182- def write (self ):
181+ def write (self ) -> None :
183182 """.. deprecated: 1.0.0
184183
185184 Use ``show`` instead. It matches Micro:Bit and Arduino APIs."""
186185 self .show ()
187186
188- def _transmit (self , buffer : bytearray ):
187+ def _transmit (self , buffer : bytearray ) -> None :
189188 neopixel_write (self .pin , buffer )
You can’t perform that action at this time.
0 commit comments