From 98d1b0998284138ce40025508ccf0497938bc1f2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 31 Jan 2024 19:50:18 +0000 Subject: [PATCH] chore(format): run black on main --- app.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/app.py b/app.py index a2cf69150..819ac3d61 100644 --- a/app.py +++ b/app.py @@ -5,27 +5,37 @@ now_dir = os.getcwd() sys.path.append(now_dir) + class InstallationError(Exception): def __init__(self, message="InstallationError"): self.message = message super().__init__(self.message) + try: - system_drive = os.getenv('SystemDrive') + system_drive = os.getenv("SystemDrive") current_drive = os.path.splitdrive(now_dir)[0] if current_drive.upper() != system_drive.upper(): - raise InstallationError(f"Error: Current working directory is not on the default system drive ({system_drive}). Please move Applio in the correct drive.") + raise InstallationError( + f"Error: Current working directory is not on the default system drive ({system_drive}). Please move Applio in the correct drive." + ) except: pass else: if "OneDrive" in now_dir: - raise InstallationError("Error: Current working directory is on OneDrive. Please move Applio in another folder.") + raise InstallationError( + "Error: Current working directory is on OneDrive. Please move Applio in another folder." + ) elif " " in now_dir: - raise InstallationError("Error: Current working directory contains spaces. Please move Applio in another folder.") + raise InstallationError( + "Error: Current working directory contains spaces. Please move Applio in another folder." + ) try: - now_dir.encode('ascii') + now_dir.encode("ascii") except UnicodeEncodeError: - raise InstallationError("Error: Current working directory contains non-ASCII characters. Please move Applio in another folder.") + raise InstallationError( + "Error: Current working directory contains non-ASCII characters. Please move Applio in another folder." + ) from tabs.inference.inference import inference_tab from tabs.train.train import train_tab