mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-01-18 15:46:46 -08:00
chore(constants): create constants module to store useful constants
This commit is contained in:
@@ -4,7 +4,9 @@ import subprocess
|
||||
import click
|
||||
from rich import print
|
||||
|
||||
from ... import USER_CONFIG_PATH
|
||||
from fastanime.cli.config import Config
|
||||
|
||||
from ...constants import USER_CONFIG_PATH
|
||||
from ..utils.tools import exit_app
|
||||
|
||||
|
||||
@@ -13,7 +15,8 @@ from ..utils.tools import exit_app
|
||||
short_help="Edit your config",
|
||||
)
|
||||
@click.option("--path", "-p", help="Print the config location and exit", is_flag=True)
|
||||
def configure(path):
|
||||
@click.pass_obj
|
||||
def configure(config: Config, path):
|
||||
if path:
|
||||
print(USER_CONFIG_PATH)
|
||||
else:
|
||||
|
||||
@@ -3,8 +3,8 @@ from configparser import ConfigParser
|
||||
|
||||
from rich import print
|
||||
|
||||
from .. import USER_CONFIG_PATH, USER_VIDEOS_DIR
|
||||
from ..AnimeProvider import AnimeProvider
|
||||
from ..constants import USER_CONFIG_PATH, USER_VIDEOS_DIR
|
||||
from ..Utility.user_data_helper import user_data_helper
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ from threading import Thread
|
||||
|
||||
import requests
|
||||
|
||||
from ... import APP_CACHE_DIR
|
||||
from ...constants import APP_CACHE_DIR
|
||||
from ...libs.anilist.anilist_data_schema import AnilistBaseMediaDataSchema
|
||||
from ...Utility import anilist_data_helper
|
||||
from ...Utility.utils import remove_html_tags, sanitize_filename
|
||||
|
||||
@@ -18,7 +18,7 @@ def exit_app(*args):
|
||||
|
||||
from rich import print
|
||||
|
||||
from ... import USER_NAME
|
||||
from ...constants import USER_NAME
|
||||
|
||||
print("Have a good day :smile:", USER_NAME)
|
||||
sys.exit(0)
|
||||
|
||||
@@ -4,7 +4,7 @@ import os
|
||||
from InquirerPy import inquirer
|
||||
from thefuzz import fuzz
|
||||
|
||||
from ... import PLATFORM
|
||||
from ...constants import PLATFORM
|
||||
from ...Utility.data import anime_normalizer
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
Reference in New Issue
Block a user