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 isort?
BillSchumacher3f2d14f4d8a2
diff --git a/.isort.cfg b/.isort.cfgnew file mode 100644index 0000000000..17eab482ff--- /dev/null+++ b/.isort.cfg@@ -0,0 +1,10 @@+[settings]+profile = black+multi_line_output = 3+include_trailing_comma = true+force_grid_wrap = 0+use_parentheses = true+ensure_newline_before_comments = true+line_length = 88+sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER+skip = .tox,__pycache__,*.pyc,venv*/*,reports,venv,env,node_modules,.env,.venv,distdiff --git a/autogpt/agent/agent.py b/autogpt/agent/agent.pyindex 6f1e15bef0..c0bb8d5bc4 100644--- a/autogpt/agent/agent.py+++ b/autogpt/agent/agent.py@@ -3,8 +3,7 @@ from colorama import Fore, Stylefrom autogpt.app import execute_command, get_commandfrom autogpt.chat import chat_with_ai, create_chat_messagefrom autogpt.config import Config-from autogpt.json_fixes.master_json_fix_method import \- fix_json_using_multiple_techniques+from autogpt.json_fixes.master_json_fix_method import fix_json_using_multiple_techniquesfrom autogpt.json_validation.validate_json import validate_jsonfrom autogpt.logs import logger, print_assistant_thoughtsfrom autogpt.speech import say_textdiff --git a/autogpt/app.py b/autogpt/app.pyindex 10eb98bb3b..03e2320cb4 100644--- a/autogpt/app.py+++ b/autogpt/app.py@@ -6,14 +6,21 @@ from autogpt.agent.agent_manager import AgentManagerfrom autogpt.commands.audio_text import read_audio_from_filefrom autogpt.commands.command import CommandRegistry, commandfrom autogpt.commands.evaluate_code import evaluate_code-from autogpt.commands.execute_code import (execute_python_file, execute_shell,- execute_shell_popen)-from autogpt.commands.file_operations import (append_to_file, delete_file,- download_file, read_file,- search_files, write_to_file)+from autogpt.commands.execute_code import (+ execute_python_file,+ execute_shell,+ execute_shell_popen,+)+from autogpt.commands.file_operations import (+ append_to_file,+ delete_file,+ download_file,+ read_file,+ search_files,+ write_to_file,+)from autogpt.commands.git_operations import clone_repository-from autogpt.commands.google_search import (google_official_search,- google_search)+from autogpt.commands.google_search import google_official_search, google_searchfrom autogpt.commands.image_gen import generate_imagefrom autogpt.commands.improve_code import improve_codefrom autogpt.commands.twitter import send_tweetdiff --git a/autogpt/json_fixes/master_json_fix_method.py b/autogpt/json_fixes/master_json_fix_method.pyindex 991a95f207..a77bf670b8 100644--- a/autogpt/json_fixes/master_json_fix_method.py+++ b/autogpt/json_fixes/master_json_fix_method.py@@ -9,7 +9,9 @@ CFG = Config()def fix_json_using_multiple_techniques(assistant_reply: str) -> Dict[Any, Any]:from autogpt.json_fixes.parsing import (- attempt_to_fix_json_by_finding_outermost_brackets, fix_and_parse_json)+ attempt_to_fix_json_by_finding_outermost_brackets,+ fix_and_parse_json,+ )# Parse and print Assistant responseassistant_reply_json = fix_and_parse_json(assistant_reply)diff --git a/autogpt/logs.py b/autogpt/logs.pyindex 4ae334329b..df3487f2c1 100644--- a/autogpt/logs.py+++ b/autogpt/logs.py@@ -204,8 +204,9 @@ logger = Logger()def print_assistant_thoughts(ai_name, assistant_reply):"""Prints the assistant's thoughts to the console"""- from autogpt.json_fixes.bracket_termination import \- attempt_to_fix_json_by_finding_outermost_brackets+ from autogpt.json_fixes.bracket_termination import (+ attempt_to_fix_json_by_finding_outermost_brackets,+ )from autogpt.json_fixes.parsing import fix_and_parse_jsontry:diff --git a/autogpt/memory/milvus.py b/autogpt/memory/milvus.pyindex e2b8fea8ff..44aa72b956 100644--- a/autogpt/memory/milvus.py+++ b/autogpt/memory/milvus.py@@ -1,6 +1,5 @@""" Milvus memory storage provider."""-from pymilvus import (Collection, CollectionSchema, DataType, FieldSchema,- connections)+from pymilvus import Collection, CollectionSchema, DataType, FieldSchema, connectionsfrom autogpt.memory.base import MemoryProviderSingleton, get_ada_embeddingdiff --git a/tests/unit/models/test_base_open_api_plugin.py b/tests/unit/models/test_base_open_api_plugin.pyindex 8f49c29503..227ed7cf7e 100644--- a/tests/unit/models/test_base_open_api_plugin.py+++ b/tests/unit/models/test_base_open_api_plugin.py@@ -2,8 +2,11 @@ from typing import Any, Dict, List, Optional, Tupleimport pytest-from autogpt.models.base_open_ai_plugin import (BaseOpenAIPlugin, Message,- PromptGenerator)+from autogpt.models.base_open_ai_plugin import (+ BaseOpenAIPlugin,+ Message,+ PromptGenerator,+)class DummyPlugin(BaseOpenAIPlugin):diff --git a/tests/unit/test_plugins.py b/tests/unit/test_plugins.pyindex 83656da207..8e673bd5e8 100644--- a/tests/unit/test_plugins.py+++ b/tests/unit/test_plugins.py@@ -1,8 +1,11 @@import pytestfrom autogpt.config import Config-from autogpt.plugins import (blacklist_whitelist_check, inspect_zip_for_module,- scan_plugins)+from autogpt.plugins import (+ blacklist_whitelist_check,+ inspect_zip_for_module,+ scan_plugins,+)PLUGINS_TEST_DIR = "tests/unit/data/test_plugins"PLUGIN_TEST_ZIP_FILE = "Auto-GPT-Plugin-Test-master.zip"