Skip to content

Commit 6e487c2

Browse files
committed
Remove futures and Detect import
1 parent c468d32 commit 6e487c2

File tree

2 files changed

+7
-21
lines changed

2 files changed

+7
-21
lines changed

adafruit_platformdetect/board.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,16 @@
2020
2121
"""
2222

23-
# imports
24-
try:
25-
from __future__ import annotations
26-
except ImportError:
27-
pass
28-
2923
import os
3024
import re
3125

3226
try:
33-
from typing import Optional, TYPE_CHECKING
27+
from typing import Optional
3428
except ImportError:
35-
TYPE_CHECKING = False
29+
pass
3630

3731
from adafruit_platformdetect.constants import boards, chips
3832

39-
if TYPE_CHECKING:
40-
from . import Detector
4133

4234
__version__ = "0.0.0-auto.0"
4335
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect.git"
@@ -46,7 +38,7 @@
4638
class Board:
4739
"""Attempt to detect specific boards."""
4840

49-
def __init__(self, detector: Detector) -> None:
41+
def __init__(self, detector) -> None:
5042
self.detector = detector
5143
self._board_id = None
5244

adafruit_platformdetect/chip.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,17 @@
1919
2020
"""
2121

22-
# imports
23-
try:
24-
from __future__ import annotations
25-
except ImportError:
26-
pass
22+
2723
import os
2824
import sys
2925

3026
try:
31-
from typing import Optional, TYPE_CHECKING
27+
from typing import Optional
3228
except ImportError:
33-
TYPE_CHECKING = False
29+
pass
3430

3531
from adafruit_platformdetect.constants import chips
3632

37-
if TYPE_CHECKING:
38-
from . import Detector
3933

4034
__version__ = "0.0.0-auto.0"
4135
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect.git"
@@ -44,7 +38,7 @@
4438
class Chip:
4539
"""Attempt detection of current chip / CPU."""
4640

47-
def __init__(self, detector: Detector) -> None:
41+
def __init__(self, detector) -> None:
4842
self.detector = detector
4943
self._chip_id = None
5044

0 commit comments

Comments
 (0)