From 96a9fe33093fd75f1894914fa7efc0da63a8e036 Mon Sep 17 00:00:00 2001 From: Patrick Loeber <98830383+ploeber@users.noreply.github.com> Date: Mon, 16 Sep 2024 12:24:45 +0200 Subject: [PATCH] Fix mypy error --- assemblyai/extras.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assemblyai/extras.py b/assemblyai/extras.py index a0dea27..5086b70 100644 --- a/assemblyai/extras.py +++ b/assemblyai/extras.py @@ -1,5 +1,5 @@ import time -from typing import BinaryIO, Generator +from typing import BinaryIO, Generator, Optional from warnings import warn from . import api @@ -22,7 +22,7 @@ def __init__( class MicrophoneStream: - def __init__(self, sample_rate: int = 44_100, device_index: int = None): + def __init__(self, sample_rate: int = 44_100, device_index: Optional[int] = None): """ Creates a stream of audio from the microphone.