Skip to content

Commit

Permalink
Merge pull request #64 from tekktrik/doc/fix-typing
Browse files Browse the repository at this point in the history
Update namedtuple type annotations
  • Loading branch information
FoamyGuy committed Jan 3, 2023
2 parents 75e24cf + a42b315 commit 3887054
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 28 deletions.
7 changes: 1 addition & 6 deletions adafruit_pybadger/clue.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@

Buttons = namedtuple("Buttons", "a b")

try:
from typing import Type
except ImportError:
pass


class Clue(PyBadgerBase):
"""Class that represents a single CLUE."""
Expand All @@ -69,7 +64,7 @@ def __init__(self) -> None:
self._buttons = KeyStates(self._keys)

@property
def button(self) -> Type[tuple]:
def button(self) -> Buttons:
"""The buttons on the board.
Example use:
Expand Down
6 changes: 1 addition & 5 deletions adafruit_pybadger/cpb_gizmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
import neopixel
from adafruit_pybadger.pybadger_base import PyBadgerBase, KeyStates

try:
from typing import Type
except ImportError:
pass

__version__ = "0.0.0+auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PyBadger.git"
Expand Down Expand Up @@ -79,7 +75,7 @@ def __init__(self) -> None:
self._light_sensor = analogio.AnalogIn(board.LIGHT)

@property
def button(self) -> Type[tuple]:
def button(self) -> Buttons:
"""The buttons on the board.
Example use:
Expand Down
6 changes: 1 addition & 5 deletions adafruit_pybadger/magtag.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
import neopixel
from adafruit_pybadger.pybadger_base import PyBadgerBase

try:
from typing import Type
except ImportError:
pass

__version__ = "0.0.0+auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PyBadger.git"
Expand All @@ -55,7 +51,7 @@ def __init__(self) -> None:
)

@property
def button(self) -> Type[tuple]:
def button(self) -> Buttons:
"""The buttons on the board.
Example use:
Expand Down
6 changes: 1 addition & 5 deletions adafruit_pybadger/pewpewm4.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
import keypad
from adafruit_pybadger.pybadger_base import PyBadgerBase, KeyStates

try:
from typing import Type
except ImportError:
pass

__version__ = "0.0.0+auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PyBadger.git"
Expand Down Expand Up @@ -68,7 +64,7 @@ def __init__(self) -> None:
self._buttons = KeyStates(self._keys)

@property
def button(self) -> Type[tuple]:
def button(self) -> Buttons:
"""The buttons on the board.
Example use:
Expand Down
6 changes: 1 addition & 5 deletions adafruit_pybadger/pybadge.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@
import neopixel
from adafruit_pybadger.pybadger_base import PyBadgerBase, KeyStates

try:
from typing import Type
except ImportError:
pass

__version__ = "0.0.0+auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PyBadger.git"
Expand Down Expand Up @@ -105,7 +101,7 @@ def __init__(self) -> None:
self._light_sensor = analogio.AnalogIn(board.A7)

@property
def button(self) -> Type[tuple]:
def button(self) -> Buttons:
"""The buttons on the board.
Example use:
Expand Down
4 changes: 2 additions & 2 deletions adafruit_pybadger/pygamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from adafruit_pybadger.pybadger_base import PyBadgerBase, KeyStates

try:
from typing import Type, Tuple
from typing import Tuple
except ImportError:
pass

Expand Down Expand Up @@ -85,7 +85,7 @@ def __init__(self) -> None:
self._light_sensor = analogio.AnalogIn(board.A7)

@property
def button(self) -> Type[tuple]:
def button(self) -> Buttons:
"""The buttons on the board.
Example use:
Expand Down

0 comments on commit 3887054

Please sign in to comment.