File tree 2 files changed +5
-11
lines changed
2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 35
35
LIFX_URL = "https://api.lifx.com/v1/lights/"
36
36
37
37
try :
38
- from typing import Union , Dict , Any
39
- from adafruit_esp32spi .adafruit_esp32spi_wifimanager import ESPSPI_WiFiManager
40
- from adafruit_espatcontrol .adafruit_espatcontrol_wifimanager import (
41
- ESPAT_WiFiManager ,
42
- )
43
- from adafruit_requests import Session , Response
44
-
45
- WifiManagerType = Union [ESPSPI_WiFiManager , ESPAT_WiFiManager , Session ]
38
+ from typing import Dict , Any
39
+ from circuitpython_typing .http import HTTPProtocol
40
+ from adafruit_requests import Response
46
41
except ImportError :
47
42
pass
48
43
@@ -55,7 +50,7 @@ class LIFX:
55
50
:param str lifx_token: LIFX API token (https://api.developer.lifx.com/docs/authentication)
56
51
"""
57
52
58
- def __init__ (self , wifi_manager : WifiManagerType , lifx_token : str ) -> None :
53
+ def __init__ (self , wifi_manager : HTTPProtocol , lifx_token : str ) -> None :
59
54
wifi_type = str (type (wifi_manager ))
60
55
allowed_wifi_types = ("ESPSPI_WiFiManager" , "ESPAT_WiFiManager" , "Session" )
61
56
if any (x in wifi_type for x in allowed_wifi_types ):
Original file line number Diff line number Diff line change 3
3
# SPDX-License-Identifier: Unlicense
4
4
5
5
Adafruit-Blinka
6
+ adafruit-circuitpython-typing ~= 1.8
6
7
adafruit-circuitpython-requests
7
- adafruit-circuitpython-esp32spi
8
- adafruit-circuitpython-esp-atcontrol
You can’t perform that action at this time.
0 commit comments