File tree Expand file tree Collapse file tree 6 files changed +7
-28
lines changed Expand file tree Collapse file tree 6 files changed +7
-28
lines changed Original file line number Diff line number Diff line change 38
38
39
39
Buttons = namedtuple ("Buttons" , "a b" )
40
40
41
- try :
42
- from typing import Type
43
- except ImportError :
44
- pass
45
-
46
41
47
42
class Clue (PyBadgerBase ):
48
43
"""Class that represents a single CLUE."""
@@ -69,7 +64,7 @@ def __init__(self) -> None:
69
64
self ._buttons = KeyStates (self ._keys )
70
65
71
66
@property
72
- def button (self ) -> Type [ tuple ] :
67
+ def button (self ) -> Buttons :
73
68
"""The buttons on the board.
74
69
75
70
Example use:
Original file line number Diff line number Diff line change 38
38
import neopixel
39
39
from adafruit_pybadger .pybadger_base import PyBadgerBase , KeyStates
40
40
41
- try :
42
- from typing import Type
43
- except ImportError :
44
- pass
45
41
46
42
__version__ = "0.0.0+auto.0"
47
43
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PyBadger.git"
@@ -79,7 +75,7 @@ def __init__(self) -> None:
79
75
self ._light_sensor = analogio .AnalogIn (board .LIGHT )
80
76
81
77
@property
82
- def button (self ) -> Type [ tuple ] :
78
+ def button (self ) -> Buttons :
83
79
"""The buttons on the board.
84
80
85
81
Example use:
Original file line number Diff line number Diff line change 30
30
import neopixel
31
31
from adafruit_pybadger .pybadger_base import PyBadgerBase
32
32
33
- try :
34
- from typing import Type
35
- except ImportError :
36
- pass
37
33
38
34
__version__ = "0.0.0+auto.0"
39
35
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PyBadger.git"
@@ -55,7 +51,7 @@ def __init__(self) -> None:
55
51
)
56
52
57
53
@property
58
- def button (self ) -> Type [ tuple ] :
54
+ def button (self ) -> Buttons :
59
55
"""The buttons on the board.
60
56
61
57
Example use:
Original file line number Diff line number Diff line change 31
31
import keypad
32
32
from adafruit_pybadger .pybadger_base import PyBadgerBase , KeyStates
33
33
34
- try :
35
- from typing import Type
36
- except ImportError :
37
- pass
38
34
39
35
__version__ = "0.0.0+auto.0"
40
36
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PyBadger.git"
@@ -68,7 +64,7 @@ def __init__(self) -> None:
68
64
self ._buttons = KeyStates (self ._keys )
69
65
70
66
@property
71
- def button (self ) -> Type [ tuple ] :
67
+ def button (self ) -> Buttons :
72
68
"""The buttons on the board.
73
69
74
70
Example use:
Original file line number Diff line number Diff line change 40
40
import neopixel
41
41
from adafruit_pybadger .pybadger_base import PyBadgerBase , KeyStates
42
42
43
- try :
44
- from typing import Type
45
- except ImportError :
46
- pass
47
43
48
44
__version__ = "0.0.0+auto.0"
49
45
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PyBadger.git"
@@ -105,7 +101,7 @@ def __init__(self) -> None:
105
101
self ._light_sensor = analogio .AnalogIn (board .A7 )
106
102
107
103
@property
108
- def button (self ) -> Type [ tuple ] :
104
+ def button (self ) -> Buttons :
109
105
"""The buttons on the board.
110
106
111
107
Example use:
Original file line number Diff line number Diff line change 36
36
from adafruit_pybadger .pybadger_base import PyBadgerBase , KeyStates
37
37
38
38
try :
39
- from typing import Type , Tuple
39
+ from typing import Tuple
40
40
except ImportError :
41
41
pass
42
42
@@ -85,7 +85,7 @@ def __init__(self) -> None:
85
85
self ._light_sensor = analogio .AnalogIn (board .A7 )
86
86
87
87
@property
88
- def button (self ) -> Type [ tuple ] :
88
+ def button (self ) -> Buttons :
89
89
"""The buttons on the board.
90
90
91
91
Example use:
You can’t perform that action at this time.
0 commit comments