diff --git a/adafruit_waveform/sine.py b/adafruit_waveform/sine.py index 5fc0cac..ace2455 100644 --- a/adafruit_waveform/sine.py +++ b/adafruit_waveform/sine.py @@ -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) diff --git a/adafruit_waveform/square.py b/adafruit_waveform/square.py index a2c4ba5..d4fdf4d 100644 --- a/adafruit_waveform/square.py +++ b/adafruit_waveform/square.py @@ -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):