From 29da76e0e81b4624268a869ed3bbf6db056aeb17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Forment?= Date: Thu, 13 Jun 2024 18:22:22 +0200 Subject: [PATCH] Fix annoying default tempo value in sardine configuration tool --- sardine_core/cli/__init__.py | 4 +++- sardine_core/fish_bowl.py | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sardine_core/cli/__init__.py b/sardine_core/cli/__init__.py index 4a8caa11..4e74e7ca 100644 --- a/sardine_core/cli/__init__.py +++ b/sardine_core/cli/__init__.py @@ -145,8 +145,10 @@ def _select_bpm_and_timing(config_file: dict) -> dict: config_file["link_clock"] = link_clock tempo = inquirer.number( message="Input a new default tempo (BPM):", - min_allowed=20, + min_allowed=20.0, + default=120.0, max_allowed=800, + float_allowed=True, validate=EmptyInputValidator(), ).execute() config_file["bpm"] = float(tempo) diff --git a/sardine_core/fish_bowl.py b/sardine_core/fish_bowl.py index 89b593b1..a9cfb4b0 100644 --- a/sardine_core/fish_bowl.py +++ b/sardine_core/fish_bowl.py @@ -88,14 +88,14 @@ def __repr__(self) -> str: self.clock, ) - ## TRANSPORT ############################################################## + ## TRANSPORT ############################################################## def pause(self) -> bool: """Pauses the fish bowl. This will emit a `pause` event unless the fish bowl does - not need to be paused, e.g. being paused once already or not - having started. + not need to be paused, e.g. being paused once already or + not having started. Returns: bool: True if the fish bowl was paused, False otherwise.