Skip to content

Commit

Permalink
Merge pull request #259 from IAHispano/formatter-main
Browse files Browse the repository at this point in the history
chore(format): run black on main
  • Loading branch information
blaisewf authored Jan 31, 2024
2 parents 5576bcc + 98d1b09 commit 1bf7ec6
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1bf7ec6

Please sign in to comment.