linted changes

This commit is contained in:
Coley
2023-04-07 16:52:50 -04:00
parent 7f4a7d7ccd
commit 7ae5ffe389
2 changed files with 17 additions and 17 deletions

View File

@@ -11,7 +11,8 @@ class AIConfig:
ai_role (str): The description of the AI's role.
ai_goals (list): The list of objectives the AI is supposed to complete.
"""
def __init__(self, ai_name:str="", ai_role:str="", ai_goals:list=[]) -> None:
def __init__(self, ai_name: str="", ai_role: str="", ai_goals: list=[]) -> None:
"""
Initialize a class instance
@@ -30,7 +31,7 @@ class AIConfig:
SAVE_FILE = "../ai_settings.yaml"
@classmethod
def load(cls:object, config_file:str=SAVE_FILE) -> object:
def load(cls: object, config_file: str=SAVE_FILE) -> object:
"""
Returns class object with parameters (ai_name, ai_role, ai_goals) loaded from yaml file if yaml file exists,
else returns class with no parameters.
@@ -54,7 +55,7 @@ class AIConfig:
return cls(ai_name, ai_role, ai_goals)
def save(self, config_file:str=SAVE_FILE) -> None:
def save(self, config_file: str=SAVE_FILE) -> None:
"""
Saves the class parameters to the specified file yaml file path as a yaml file.
@@ -88,6 +89,7 @@ class AIConfig:
full_prompt += f"\n\n{data.load_prompt()}"
return full_prompt
if __name__ == "__main__":
import doctest
doctest.testmod()

View File

@@ -62,5 +62,3 @@ def write_tests(code: str, focus: List[str]) -> str:
result_string = call_ai_function(function_string, args, description_string)
return result_string