Resolve Linter Issues

pull/1096/head
Eesa Hamza 2023-04-13 15:09:24 +03:00
parent a10ffc1dbe
commit ff094c7ecc
2 changed files with 4 additions and 5 deletions

View File

@ -327,19 +327,18 @@ def parse_arguments():
if args.ai_settings_file:
file = args.ai_settings_file
# Validate file
(validated, message) = utils.validate_yaml_file(file)
if not validated:
logger.typewriter_log("FAILED FILE VALIDATION", Fore.RED, message)
exit(1)
logger.typewriter_log("Using AI Settings File:", Fore.GREEN, file)
cfg.ai_settings_file = file
cfg.skip_reprompt = True
# TODO: fill in llm values here
check_openai_api_key()
parse_arguments()

View File

@ -18,5 +18,5 @@ def validate_yaml_file(file: str):
return (False, f"The file {Fore.CYAN}`{file}`{Fore.RESET} wasn't found")
except yaml.YAMLError as e:
return (False, f"There was an issue while trying to read with your AI Settings file: {e}")
return (True, f"Successfully validated {Fore.CYAN}`{file}`{Fore.RESET}!")
return (True, f"Successfully validated {Fore.CYAN}`{file}`{Fore.RESET}!")