Skip to content

Commit 5bb0fb1

Browse files
committed
Revert "Changes per review"
This reverts commit 2980950.
1 parent 2980950 commit 5bb0fb1

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repos:
2424
name: pylint (library code)
2525
types: [python]
2626
args:
27-
- --disable=consider-using-f-string
27+
- --disable=consider-using-f-string,duplicate-code
2828
exclude: "^(docs/|examples/|tests/|setup.py$)"
2929
- id: pylint
3030
name: pylint (example code)

adafruit_funhouse/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def __init__(
7272
self,
7373
*,
7474
url: Optional[str] = None,
75-
headers: Optional[Dict[str, str]] = None,
75+
headers: Dict[str, str] = None,
7676
json_path: Optional[Union[List[str], List[List[str]]]] = None,
7777
regexp_path: Optional[Sequence[str]] = None,
7878
default_bg: int = 0,

adafruit_funhouse/peripherals.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
2828
"""
2929

30+
from typing import Optional
3031
import board
3132
from digitalio import DigitalInOut, Direction, Pull
3233
from analogio import AnalogIn
@@ -36,11 +37,6 @@
3637
import adafruit_ahtx0
3738
import adafruit_dotstar
3839

39-
try:
40-
from typing import Optional
41-
except ImportError:
42-
pass
43-
4440
__version__ = "0.0.0-auto.0"
4541
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_FunHouse.git"
4642

@@ -95,7 +91,7 @@ def __init__(self) -> None:
9591
self._pir.direction = Direction.INPUT
9692

9793
@staticmethod
98-
def play_tone(frequency: int, duration: float) -> None:
94+
def play_tone(frequency: float, duration: float) -> None:
9995
"""Automatically Enable/Disable the speaker and play
10096
a tone at the specified frequency for the specified duration
10197
It will attempt to play the sound up to 3 times in the case of

0 commit comments

Comments
 (0)