mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-25 00:33:37 +05:00
style: reformat code
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -11,9 +11,9 @@
|
||||
|
||||
import textwrap
|
||||
|
||||
from kiauh.components.moonraker import moonraker_remove
|
||||
from kiauh.core.menus import BACK_HELP_FOOTER
|
||||
from kiauh.core.menus.base_menu import BaseMenu
|
||||
from kiauh.components.moonraker import moonraker_remove
|
||||
from kiauh.utils.constants import RESET_FORMAT, COLOR_RED, COLOR_CYAN
|
||||
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
import textwrap
|
||||
from typing import List
|
||||
|
||||
from kiauh.core.menus.base_menu import print_back_footer
|
||||
from kiauh.components.klipper.klipper import Klipper
|
||||
from kiauh.components.moonraker.moonraker import Moonraker
|
||||
from kiauh.core.menus.base_menu import print_back_footer
|
||||
from kiauh.utils.constants import COLOR_GREEN, RESET_FORMAT, COLOR_YELLOW, COLOR_CYAN
|
||||
|
||||
|
||||
@@ -39,11 +39,11 @@ def print_moonraker_overview(
|
||||
dialog += "| |\n"
|
||||
|
||||
instance_map = {
|
||||
k.get_service_file_name(): k.get_service_file_name().replace(
|
||||
"klipper", "moonraker"
|
||||
k.get_service_file_name(): (
|
||||
k.get_service_file_name().replace("klipper", "moonraker")
|
||||
if k.suffix in [m.suffix for m in moonraker_instances]
|
||||
else ""
|
||||
)
|
||||
if k.suffix in [m.suffix for m in moonraker_instances]
|
||||
else ""
|
||||
for k in klipper_instances
|
||||
}
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ import shutil
|
||||
import subprocess
|
||||
from typing import List, Union
|
||||
|
||||
from kiauh.core.instance_manager.instance_manager import InstanceManager
|
||||
from kiauh.components.klipper.klipper_dialogs import print_instance_overview
|
||||
from kiauh.components.moonraker import MOONRAKER_DIR, MOONRAKER_ENV_DIR
|
||||
from kiauh.components.moonraker.moonraker import Moonraker
|
||||
from kiauh.core.instance_manager.instance_manager import InstanceManager
|
||||
from kiauh.utils.filesystem_utils import remove_file
|
||||
from kiauh.utils.input_utils import get_selection_input
|
||||
from kiauh.utils.logger import Logger
|
||||
|
||||
@@ -29,13 +29,13 @@ from kiauh.components.moonraker import (
|
||||
POLKIT_FILE,
|
||||
POLKIT_USR_FILE,
|
||||
POLKIT_SCRIPT,
|
||||
)
|
||||
)
|
||||
from kiauh.components.moonraker.moonraker import Moonraker
|
||||
from kiauh.components.moonraker.moonraker_dialogs import print_moonraker_overview
|
||||
from kiauh.components.moonraker.moonraker_utils import (
|
||||
create_example_moonraker_conf,
|
||||
backup_moonraker_dir,
|
||||
)
|
||||
)
|
||||
from kiauh.core.config_manager.config_manager import ConfigManager
|
||||
from kiauh.core.instance_manager.instance_manager import InstanceManager
|
||||
from kiauh.core.repo_manager.repo_manager import RepoManager
|
||||
@@ -43,7 +43,7 @@ from kiauh.utils.filesystem_utils import check_file_exist
|
||||
from kiauh.utils.input_utils import (
|
||||
get_confirm,
|
||||
get_selection_input,
|
||||
)
|
||||
)
|
||||
from kiauh.utils.logger import Logger
|
||||
from kiauh.utils.system_utils import (
|
||||
parse_packages_from_file,
|
||||
@@ -51,7 +51,7 @@ from kiauh.utils.system_utils import (
|
||||
install_python_requirements,
|
||||
update_system_package_lists,
|
||||
install_system_packages,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def install_moonraker() -> None:
|
||||
|
||||
@@ -21,7 +21,7 @@ from kiauh.components.moonraker import (
|
||||
MOONRAKER_ENV_DIR,
|
||||
MOONRAKER_BACKUP_DIR,
|
||||
MOONRAKER_DB_BACKUP_DIR,
|
||||
)
|
||||
)
|
||||
from kiauh.components.moonraker.moonraker import Moonraker
|
||||
from kiauh.core.backup_manager.backup_manager import BackupManager
|
||||
from kiauh.core.config_manager.config_manager import ConfigManager
|
||||
@@ -31,15 +31,13 @@ from kiauh.utils.common import get_install_status_common
|
||||
from kiauh.utils.logger import Logger
|
||||
from kiauh.utils.system_utils import (
|
||||
get_ipv4_addr,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def get_moonraker_status() -> (
|
||||
Dict[
|
||||
Literal["status", "status_code", "instances", "repo", "local", "remote"],
|
||||
Union[str, int],
|
||||
]
|
||||
):
|
||||
def get_moonraker_status() -> Dict[
|
||||
Literal["status", "status_code", "instances", "repo", "local", "remote"],
|
||||
Union[str, int],
|
||||
]:
|
||||
status = get_install_status_common(Moonraker, MOONRAKER_DIR, MOONRAKER_ENV_DIR)
|
||||
return {
|
||||
"status": status.get("status"),
|
||||
|
||||
Reference in New Issue
Block a user