Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion adafruit_waveform/sine.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Waveform.git"


def sine_wave(sample_frequency, pitch):
def sine_wave(sample_frequency: float, pitch: float):
"""Generate a single sine wav cycle at the given sampling frequency and pitch."""
length = int(sample_frequency / pitch)
b = array.array("H", [0] * length)
Expand Down
2 changes: 1 addition & 1 deletion adafruit_waveform/square.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Waveform.git"


def square_wave(sample_length=2):
def square_wave(sample_length: int = 2):
"""Generate a single square wave of sample_length size"""
square = array.array("H", [0] * sample_length)
for i in range(sample_length // 2):
Expand Down