Fix isort?

This commit is contained in:
BillSchumacher
2023-04-18 19:07:39 -05:00
parent 221a4b0b50
commit 3f2d14f4d8
8 changed files with 42 additions and 18 deletions

10
.isort.cfg Normal file
View File

@@ -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,dist

View File

@@ -3,8 +3,7 @@ from colorama import Fore, Style
from autogpt.app import execute_command, get_command
from autogpt.chat import chat_with_ai, create_chat_message
from 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_techniques
from autogpt.json_validation.validate_json import validate_json
from autogpt.logs import logger, print_assistant_thoughts
from autogpt.speech import say_text

View File

@@ -6,14 +6,21 @@ from autogpt.agent.agent_manager import AgentManager
from autogpt.commands.audio_text import read_audio_from_file
from autogpt.commands.command import CommandRegistry, command
from 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_search
from autogpt.commands.image_gen import generate_image
from autogpt.commands.improve_code import improve_code
from autogpt.commands.twitter import send_tweet

View File

@@ -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 response
assistant_reply_json = fix_and_parse_json(assistant_reply)

View File

@@ -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_json
try:

View File

@@ -1,6 +1,5 @@
""" Milvus memory storage provider."""
from pymilvus import (Collection, CollectionSchema, DataType, FieldSchema,
connections)
from pymilvus import Collection, CollectionSchema, DataType, FieldSchema, connections
from autogpt.memory.base import MemoryProviderSingleton, get_ada_embedding

View File

@@ -2,8 +2,11 @@ from typing import Any, Dict, List, Optional, Tuple
import 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):

View File

@@ -1,8 +1,11 @@
import pytest
from 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"