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 44
55repos :
66- repo : https://github.com/python/black
7- rev : 20.8b1
7+ rev : 22.3.0
88 hooks :
99 - id : black
10+ additional_dependencies : ['click==8.0.4']
1011- repo : https://github.com/fsfe/reuse-tool
1112 rev : v0.12.1
1213 hooks :
Original file line number Diff line number Diff line change 88import os
99import re
1010import sys
11- from typing import Optional
1211
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
1519
1620# Needed to find libs (like libusb) installed by homebrew on Apple Silicon
1721if sys .platform == "darwin" :
Original file line number Diff line number Diff line change 2020
2121"""
2222
23- # imports
24- from __future__ import annotations
2523import os
2624import re
27- from typing import Optional , TYPE_CHECKING
28- from .constants import boards , chips
2925
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+
3233
3334__version__ = "0.0.0-auto.0"
3435__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect.git"
3738class Board :
3839 """Attempt to detect specific boards."""
3940
40- def __init__ (self , detector : Detector ) -> None :
41+ def __init__ (self , detector ) -> None :
4142 self .detector = detector
4243 self ._board_id = None
4344
Original file line number Diff line number Diff line change 1919
2020"""
2121
22- # imports
23- from __future__ import annotations
22+
2423import os
2524import sys
26- from typing import Optional , TYPE_CHECKING
27- from .constants import chips
2825
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+
3133
3234__version__ = "0.0.0-auto.0"
3335__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect.git"
3638class Chip :
3739 """Attempt detection of current chip / CPU."""
3840
39- def __init__ (self , detector : Detector ) -> None :
41+ def __init__ (self , detector ) -> None :
4042 self .detector = detector
4143 self ._chip_id = None
4244
You can’t perform that action at this time.
0 commit comments