34
34
from adafruit_portalbase .wifi_esp32s2 import WiFi
35
35
36
36
try :
37
- from typing import Optional , Union
37
+ from typing import Optional , Union , Callable
38
38
from adafruit_dotstar import DotStar
39
39
except ImportError :
40
40
pass
@@ -166,7 +166,7 @@ def on_mqtt_connect(self):
166
166
return None
167
167
168
168
@on_mqtt_connect .setter
169
- def on_mqtt_connect (self , value : function ):
169
+ def on_mqtt_connect (self , value : Callable ):
170
170
self ._get_mqtt_client ()
171
171
self ._mqtt_client .on_connect = value
172
172
@@ -181,7 +181,7 @@ def on_mqtt_disconnect(self):
181
181
return None
182
182
183
183
@on_mqtt_disconnect .setter
184
- def on_mqtt_disconnect (self , value : function ):
184
+ def on_mqtt_disconnect (self , value : Callable ):
185
185
self ._get_mqtt_client ().on_disconnect = value
186
186
187
187
@property
@@ -195,7 +195,7 @@ def on_mqtt_subscribe(self):
195
195
return None
196
196
197
197
@on_mqtt_subscribe .setter
198
- def on_mqtt_subscribe (self , value : function ):
198
+ def on_mqtt_subscribe (self , value : Callable ):
199
199
self ._get_mqtt_client ().on_subscribe = value
200
200
201
201
@property
@@ -209,7 +209,7 @@ def on_mqtt_unsubscribe(self):
209
209
return None
210
210
211
211
@on_mqtt_unsubscribe .setter
212
- def on_mqtt_unsubscribe (self , value : function ):
212
+ def on_mqtt_unsubscribe (self , value : Callable ):
213
213
self ._get_mqtt_client ().on_unsubscribe = value
214
214
215
215
@property
@@ -223,7 +223,7 @@ def on_mqtt_message(self):
223
223
return None
224
224
225
225
@on_mqtt_message .setter
226
- def on_mqtt_message (self , value : function ):
226
+ def on_mqtt_message (self , value : Callable ):
227
227
self ._get_mqtt_client ().on_message = value
228
228
229
229
@property
0 commit comments