Skip to content

Commit

Permalink
Refactor mutable default parameters in run function (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
dumitrugutu authored Aug 27, 2024
1 parent 9f6f011 commit 78e60ac
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.1] - 2024-08-28

### Changed

- Refactor mutable default parameters in run function

## [2.0.0] - 2024-08-01

### Changed
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
2.0.1
8 changes: 6 additions & 2 deletions speechmatics/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,9 @@ async def run(
self,
stream,
transcription_config: TranscriptionConfig,
audio_settings: AudioSettings = AudioSettings(),
audio_settings: AudioSettings = None,
from_cli: bool = False,
extra_headers: Dict = dict(),
extra_headers: Dict = None,
):
"""
Begin a new recognition session.
Expand All @@ -452,6 +452,10 @@ async def run(
self.seq_no = 0
self._language_pack_info = None
await self._init_synchronization_primitives()
if extra_headers is None:
extra_headers = {}
if audio_settings is None:
audio_settings = AudioSettings()
if (
not self.connection_settings.generate_temp_token
and self.connection_settings.auth_token is not None
Expand Down

0 comments on commit 78e60ac

Please sign in to comment.