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.
linting
BillSchumacher16f0e22ffa49
diff --git a/autogpt/app.py b/autogpt/app.pyindex 7c24f70162..cf8e29a36d 100644--- a/autogpt/app.py+++ b/autogpt/app.py@@ -135,7 +135,9 @@ def execute_command(return f"Error: {str(e)}"-@command("get_text_summary", "Get text summary", '"url": "<url>", "question": "<question>"')+@command(+ "get_text_summary", "Get text summary", '"url": "<url>", "question": "<question>"'+)def get_text_summary(url: str, question: str) -> str:"""Return the results of a Google searchdiff --git a/autogpt/commands/command.py b/autogpt/commands/command.pyindex 26fa445bb9..e97af008a4 100644--- a/autogpt/commands/command.py+++ b/autogpt/commands/command.py@@ -20,7 +20,7 @@ class Command:name: str,description: str,method: Callable[..., Any],- signature: str = '',+ signature: str = "",enabled: bool = True,disabled_reason: Optional[str] = None,):@@ -126,7 +126,7 @@ class CommandRegistry:def command(name: str,description: str,- signature: str = '',+ signature: str = "",enabled: bool = True,disabled_reason: Optional[str] = None,) -> Callable[..., Any]:diff --git a/autogpt/commands/file_operations.py b/autogpt/commands/file_operations.pyindex d8f8e66402..b73fb98792 100644--- a/autogpt/commands/file_operations.py+++ b/autogpt/commands/file_operations.py@@ -9,8 +9,8 @@ import requestsfrom colorama import Back, Forefrom requests.adapters import HTTPAdapter, Retry-from autogpt.config import Configfrom autogpt.commands.command import command+from autogpt.config import Configfrom autogpt.spinner import Spinnerfrom autogpt.utils import readable_file_sizefrom autogpt.workspace import WORKSPACE_PATH, path_in_workspace@@ -163,7 +163,9 @@ def write_to_file(filename: str, text: str) -> str:return f"Error: {str(e)}"-@command("append_to_file", "Append to file", '"filename": "<filename>", "text": "<text>"')+@command(+ "append_to_file", "Append to file", '"filename": "<filename>", "text": "<text>"'+)def append_to_file(filename: str, text: str, shouldLog: bool = True) -> str:"""Append text to a file@@ -235,8 +237,13 @@ def search_files(directory: str) -> list[str]:return found_files--@command("download_file", "Search Files", '"url": "<url>", "filename": "<filename>"', CFG.allow_downloads, "Error: You do not have user authorization to download files locally.")+@command(+ "download_file",+ "Search Files",+ '"url": "<url>", "filename": "<filename>"',+ CFG.allow_downloads,+ "Error: You do not have user authorization to download files locally.",+)def download_file(url, filename):"""Downloads a fileArgs:diff --git a/autogpt/config/ai_config.py b/autogpt/config/ai_config.pyindex 292978a417..1e48ab4db7 100644--- a/autogpt/config/ai_config.py+++ b/autogpt/config/ai_config.py@@ -47,7 +47,6 @@ class AIConfig:self.prompt_generator = Noneself.command_registry = None-@staticmethoddef load(config_file: str = SAVE_FILE) -> "AIConfig":"""diff --git a/autogpt/config/config.py b/autogpt/config/config.pyindex 1ee8eabf68..801df2bb21 100644--- a/autogpt/config/config.py+++ b/autogpt/config/config.py@@ -131,7 +131,7 @@ class Config(metaclass=Singleton):plugins_allowlist = os.getenv("ALLOWLISTED_PLUGINS")if plugins_allowlist:- plugins_allowlist=plugins_allowlist.split(",")+ plugins_allowlist = plugins_allowlist.split(",")self.plugins_whitelist = plugins_allowlistelse:self.plugins_whitelist = []diff --git a/autogpt/prompts/prompt.py b/autogpt/prompts/prompt.pyindex e25ea7457f..79de04ea8f 100644--- a/autogpt/prompts/prompt.py+++ b/autogpt/prompts/prompt.py@@ -71,9 +71,7 @@ def build_default_prompt_generator() -> PromptGenerator:"Every command has a cost, so be smart and efficient. Aim to complete tasks in"" the least number of steps.")- prompt_generator.add_performance_evaluation(- "Write all code to a file."- )+ prompt_generator.add_performance_evaluation("Write all code to a file.")return prompt_generator