feat: use click where necessary

This commit is contained in:
Benex254
2024-08-07 19:48:47 +03:00
parent ec8ae61354
commit 1dafcfa886
9 changed files with 62 additions and 37 deletions

View File

@@ -1,10 +1,8 @@
import logging
import os
from InquirerPy import inquirer
from thefuzz import fuzz
from ...constants import PLATFORM
from ...Utility.data import anime_normalizer
logger = logging.getLogger(__name__)
@@ -41,14 +39,9 @@ def get_true_bg(string, r: int, g: int, b: int) -> str:
return f"\033[48;2;{r};{g};{b};m{string}{RESET}"
def clear():
if PLATFORM == "Windows":
os.system("cls")
else:
os.system("clear")
def fuzzy_inquirer(prompt: str, choices, **kwargs):
from click import clear
clear()
action = inquirer.fuzzy(
prompt,