Skip to content

Commit 2980950

Browse files
committed
Changes per review
1 parent 948225b commit 2980950

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
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,duplicate-code
27+
- --disable=consider-using-f-string
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: Dict[str, str] = None,
75+
headers: Optional[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: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
2828
"""
2929

30-
from typing import Optional
3130
import board
3231
from digitalio import DigitalInOut, Direction, Pull
3332
from analogio import AnalogIn
@@ -37,6 +36,11 @@
3736
import adafruit_ahtx0
3837
import adafruit_dotstar
3938

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

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

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

0 commit comments

Comments
 (0)