Skip to content

Commit 41917e6

Browse files
authored
Merge pull request #22 from rhooper/main
add type hints - fixes #21
2 parents e49e4be + 6d39865 commit 41917e6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

adafruit_waveform/sine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Waveform.git"
2020

2121

22-
def sine_wave(sample_frequency, pitch):
22+
def sine_wave(sample_frequency: float, pitch: float):
2323
"""Generate a single sine wav cycle at the given sampling frequency and pitch."""
2424
length = int(sample_frequency / pitch)
2525
b = array.array("H", [0] * length)

adafruit_waveform/square.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Waveform.git"
1919

2020

21-
def square_wave(sample_length=2):
21+
def square_wave(sample_length: int = 2):
2222
"""Generate a single square wave of sample_length size"""
2323
square = array.array("H", [0] * sample_length)
2424
for i in range(sample_length // 2):

0 commit comments

Comments
 (0)