Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Fix typo's (#2735)

lengweiping198363c218287085
diff --git a/autogpt/commands/analyze_code.py b/autogpt/commands/analyze_code.py
index b87d73e1b7..47cfc1e765 100644
--- a/autogpt/commands/analyze_code.py
+++ b/autogpt/commands/analyze_code.py
@@ -22,10 +22,10 @@ def analyze_code(code: str) -> list[str]:
improve the code.
"""
- function_string = "def analyze_code(code: str) -> List[str]:"
+ function_string = "def analyze_code(code: str) -> list[str]:"
args = [code]
description_string = (
- "Analyzes the given code and returns a list of suggestions" " for improvements."
+ "Analyzes the given code and returns a list of suggestions for improvements."
)
return call_ai_function(function_string, args, description_string)
diff --git a/autogpt/commands/git_operations.py b/autogpt/commands/git_operations.py
index 1fb99e5b2e..1a6beb95de 100644
--- a/autogpt/commands/git_operations.py
+++ b/autogpt/commands/git_operations.py
@@ -10,20 +10,21 @@ CFG = Config()
@command(
"clone_repository",
- "Clone Repositoryy",
+ "Clone Repository",
'"repository_url": "<repository_url>", "clone_path": "<clone_path>"',
CFG.github_username and CFG.github_api_key,
"Configure github_username and github_api_key.",
)
def clone_repository(repository_url: str, clone_path: str) -> str:
- """Clone a GitHub repository locally
+ """Clone a GitHub repository locally.
Args:
- repository_url (str): The URL of the repository to clone
- clone_path (str): The path to clone the repository to
+ repository_url (str): The URL of the repository to clone.
+ clone_path (str): The path to clone the repository to.
Returns:
- str: The result of the clone operation"""
+ str: The result of the clone operation.
+ """
split_url = repository_url.split("//")
auth_repo_url = f"//{CFG.github_username}:{CFG.github_api_key}@".join(split_url)
safe_clone_path = path_in_workspace(clone_path)
diff --git a/autogpt/commands/improve_code.py b/autogpt/commands/improve_code.py
index 41a369b4db..f953cf2bd3 100644
--- a/autogpt/commands/improve_code.py
+++ b/autogpt/commands/improve_code.py
@@ -17,14 +17,14 @@ def improve_code(suggestions: list[str], code: str) -> str:
chat completion api call.
Parameters:
- suggestions (List): A list of suggestions around what needs to be improved.
+ suggestions (list): A list of suggestions around what needs to be improved.
code (str): Code to be improved.
Returns:
A result string from create chat completion. Improved code in response.
"""
function_string = (
- "def generate_improved_code(suggestions: List[str], code: str) -> str:"
+ "def generate_improved_code(suggestions: list[str], code: str) -> str:"
)
args = [json.dumps(suggestions), code]
description_string = (