@@ -28,7 +28,7 @@ def __init__(self, i2c_bus=None, address=None):
2828 self ._on_button_b_long_press = None
2929 self ._on_button_c_long_press = None
3030
31- def set_led_status (self , a : bool , b : bool , c : bool ):
31+ def set_led_status (self , a : bool , b : bool , c : bool ) -> None :
3232 """
3333 Turn on or off the button LEDs according to the given status.
3434
@@ -52,134 +52,134 @@ def long_press_duration(self) -> int:
5252 return self ._long_press_duration
5353
5454 @long_press_duration .setter
55- def long_press_duration (self , value : int ):
55+ def long_press_duration (self , value : int ) -> None :
5656 """
5757 Sets the duration in milliseconds that the button must
5858 be pressed to trigger the long press event
5959 """
6060 self ._long_press_duration = value
6161
6262 @property
63- def on_button_a_press (self ) -> function :
63+ def on_button_a_press (self ):
6464 """
6565 Returns the callback for the press event of button A.
6666 """
6767 return self ._on_button_a_press
6868
6969 @on_button_a_press .setter
70- def on_button_a_press (self , value ):
70+ def on_button_a_press (self , value ) -> None :
7171 """
7272 Sets the callback for the press event of button A.
7373 """
7474 self ._on_button_a_press = value
7575
7676 @property
77- def on_button_a_release (self ) -> function :
77+ def on_button_a_release (self ):
7878 """
7979 Returns the callback for the release event of button A.
8080 """
8181 return self ._on_button_a_release
8282
8383 @on_button_a_release .setter
84- def on_button_a_release (self , value ):
84+ def on_button_a_release (self , value ) -> None :
8585 """
8686 Sets the callback for the release event of button A.
8787 """
8888 self ._on_button_a_release = value
8989
9090 @property
91- def on_button_a_long_press (self ) -> function :
91+ def on_button_a_long_press (self ):
9292 """
9393 Returns the callback for the long press event of button A.
9494 """
9595 return self ._on_button_a_long_press
9696
9797 @on_button_a_long_press .setter
98- def on_button_a_long_press (self , value ):
98+ def on_button_a_long_press (self , value ) -> None :
9999 """
100100 Sets the callback for the long press event of button A.
101101 """
102102 self ._on_button_a_long_press = value
103103
104104 @property
105- def on_button_b_press (self ) -> function :
105+ def on_button_b_press (self ):
106106 """
107107 Returns the callback for the press event of button B.
108108 """
109109 return self ._on_button_b_press
110110
111111 @on_button_b_press .setter
112- def on_button_b_press (self , value ):
112+ def on_button_b_press (self , value ) -> None :
113113 """
114114 Sets the callback for the press event of button B.
115115 """
116116 self ._on_button_b_press = value
117117
118118 @property
119- def on_button_b_release (self ) -> function :
119+ def on_button_b_release (self ):
120120 """
121121 Returns the callback for the release event of button B.
122122 """
123123 return self ._on_button_b_release
124124
125125 @on_button_b_release .setter
126- def on_button_b_release (self , value ):
126+ def on_button_b_release (self , value ) -> None :
127127 """
128128 Sets the callback for the release event of button B.
129129 """
130130 self ._on_button_b_release = value
131131
132132 @property
133- def on_button_b_long_press (self ) -> function :
133+ def on_button_b_long_press (self ):
134134 """
135135 Returns the callback for the long press event of button B.
136136 """
137137 return self ._on_button_b_long_press
138138
139139 @on_button_b_long_press .setter
140- def on_button_b_long_press (self , value ):
140+ def on_button_b_long_press (self , value ) -> None :
141141 """
142142 Sets the callback for the long press event of button B.
143143 """
144144 self ._on_button_b_long_press = value
145145
146146 @property
147- def on_button_c_press (self ) -> function :
147+ def on_button_c_press (self ):
148148 """
149149 Returns the callback for the press event of button C.
150150 """
151151 return self ._on_button_c_press
152152
153153 @on_button_c_press .setter
154- def on_button_c_press (self , value ):
154+ def on_button_c_press (self , value ) -> None :
155155 """
156156 Sets the callback for the press event of button C.
157157 """
158158 self ._on_button_c_press = value
159159
160160 @property
161- def on_button_c_release (self ) -> function :
161+ def on_button_c_release (self ):
162162 """
163163 Returns the callback for the release event of button C.
164164 """
165165 return self ._on_button_c_release
166166
167167 @on_button_c_release .setter
168- def on_button_c_release (self , value ):
168+ def on_button_c_release (self , value ) -> None :
169169 """
170170 Sets the callback for the release event of button C.
171171 """
172172 self ._on_button_c_release = value
173173
174174 @property
175- def on_button_c_long_press (self ) -> function :
175+ def on_button_c_long_press (self ):
176176 """
177177 Returns the callback for the long press event of button C.
178178 """
179179 return self ._on_button_c_long_press
180180
181181 @on_button_c_long_press .setter
182- def on_button_c_long_press (self , value ):
182+ def on_button_c_long_press (self , value ) -> None :
183183 """
184184 Sets the callback for the long press event of button C.
185185 """
@@ -243,7 +243,7 @@ def update(self) -> bool:
243243
244244 return button_states_changed
245245
246- def is_pressed (self , index ) -> bool :
246+ def is_pressed (self , index : int ) -> bool :
247247 """
248248 Returns True if the button at the given index is currently pressed.
249249
@@ -253,7 +253,7 @@ def is_pressed(self, index) -> bool:
253253 return self ._current_buttons_status [index ]
254254
255255 @property
256- def button_a_pressed (self ):
256+ def button_a_pressed (self ) -> bool :
257257 """
258258 Returns True if button A is currently pressed.
259259 """
0 commit comments