File tree Expand file tree Collapse file tree 4 files changed +26
-18
lines changed Expand file tree Collapse file tree 4 files changed +26
-18
lines changed Original file line number Diff line number Diff line change 4
4
5
5
repos :
6
6
- repo : https://github.com/python/black
7
- rev : 20.8b1
7
+ rev : 22.3.0
8
8
hooks :
9
9
- id : black
10
+ additional_dependencies : ['click==8.0.4']
10
11
- repo : https://github.com/fsfe/reuse-tool
11
12
rev : v0.12.1
12
13
hooks :
Original file line number Diff line number Diff line change 8
8
import os
9
9
import re
10
10
import sys
11
- from typing import Optional
12
11
13
- from .board import Board
14
- from .chip import Chip
12
+ try :
13
+ from typing import Optional
14
+ except ImportError :
15
+ pass
16
+
17
+ from adafruit_platformdetect .board import Board
18
+ from adafruit_platformdetect .chip import Chip
15
19
16
20
# Needed to find libs (like libusb) installed by homebrew on Apple Silicon
17
21
if sys .platform == "darwin" :
Original file line number Diff line number Diff line change 20
20
21
21
"""
22
22
23
- # imports
24
- from __future__ import annotations
25
23
import os
26
24
import re
27
- from typing import Optional , TYPE_CHECKING
28
- from .constants import boards , chips
29
25
30
- if TYPE_CHECKING :
31
- from . import Detector
26
+ try :
27
+ from typing import Optional
28
+ except ImportError :
29
+ pass
30
+
31
+ from adafruit_platformdetect .constants import boards , chips
32
+
32
33
33
34
__version__ = "0.0.0-auto.0"
34
35
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect.git"
37
38
class Board :
38
39
"""Attempt to detect specific boards."""
39
40
40
- def __init__ (self , detector : Detector ) -> None :
41
+ def __init__ (self , detector ) -> None :
41
42
self .detector = detector
42
43
self ._board_id = None
43
44
Original file line number Diff line number Diff line change 19
19
20
20
"""
21
21
22
- # imports
23
- from __future__ import annotations
22
+
24
23
import os
25
24
import sys
26
- from typing import Optional , TYPE_CHECKING
27
- from .constants import chips
28
25
29
- if TYPE_CHECKING :
30
- from . import Detector
26
+ try :
27
+ from typing import Optional
28
+ except ImportError :
29
+ pass
30
+
31
+ from adafruit_platformdetect .constants import chips
32
+
31
33
32
34
__version__ = "0.0.0-auto.0"
33
35
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect.git"
36
38
class Chip :
37
39
"""Attempt detection of current chip / CPU."""
38
40
39
- def __init__ (self , detector : Detector ) -> None :
41
+ def __init__ (self , detector ) -> None :
40
42
self .detector = detector
41
43
self ._chip_id = None
42
44
You can’t perform that action at this time.
0 commit comments