File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -33,20 +33,20 @@ class MagicLightService(Service):
33
33
uuid = VendorUUID ("0000ffe9-0000-1000-8000-00805f9b34fb" ), max_length = 7
34
34
)
35
35
36
- def __init__ (self , service : None = None ) -> None :
36
+ def __init__ (self , service : Optional [ "MagicLightService" ] = None ) -> None :
37
37
super ().__init__ (service = service )
38
38
self ._color = 0xFFFFFF
39
39
self ._buf = bytearray (7 )
40
40
self ._buf [0 ] = 0x56
41
41
self ._buf [6 ] = 0xAA
42
42
self ._brightness = 1.0
43
43
44
- def __getitem__ (self , index : int ) -> IndexError | int :
44
+ def __getitem__ (self , index : int ) -> int :
45
45
if index > 0 :
46
46
raise IndexError ()
47
47
return self ._color
48
48
49
- def __setitem__ (self , index : int , value : int ) -> Optional [ IndexError ] :
49
+ def __setitem__ (self , index : int , value : int ) -> None :
50
50
if index > 0 :
51
51
raise IndexError ()
52
52
if isinstance (value , int ):
You can’t perform that action at this time.
0 commit comments