refactor: overhaul of the klipper setup process

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
dw-0
2024-07-27 21:13:56 +02:00
parent fee2dd0bda
commit 871bedb76b
9 changed files with 211 additions and 406 deletions

View File

@@ -6,6 +6,8 @@
# #
# This file may be distributed under the terms of the GNU GPLv3 license #
# ======================================================================= #
from __future__ import annotations
import re
from typing import List, Union
@@ -14,9 +16,7 @@ from utils.constants import COLOR_CYAN, RESET_FORMAT
from utils.logger import Logger
def get_confirm(
question: str, default_choice=True, allow_go_back=False
) -> Union[bool, None]:
def get_confirm(question: str, default_choice=True, allow_go_back=False) -> bool | None:
"""
Helper method for validating confirmation (yes/no) user input. |
:param question: The question to display
@@ -56,7 +56,7 @@ def get_number_input(
max_count=None,
default=None,
allow_go_back=False,
) -> Union[int, None]:
) -> int | None:
"""
Helper method to get a number input from the user
:param question: The question to display