Skip to content

Commit

Permalink
Fix isort?
Browse files Browse the repository at this point in the history
  • Loading branch information
BillSchumacher committed Apr 19, 2023
1 parent 221a4b0 commit 3f2d14f
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 18 deletions.
10 changes: 10 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions autogpt/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
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
Expand Down
21 changes: 14 additions & 7 deletions autogpt/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@
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
Expand Down
4 changes: 3 additions & 1 deletion autogpt/json_fixes/master_json_fix_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

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)
Expand Down
5 changes: 3 additions & 2 deletions autogpt/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ def remove_color_codes(s: str) -> str:

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:
Expand Down
3 changes: 1 addition & 2 deletions autogpt/memory/milvus.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
7 changes: 5 additions & 2 deletions tests/unit/models/test_base_open_api_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

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):
Expand Down
7 changes: 5 additions & 2 deletions tests/unit/test_plugins.py
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 3f2d14f

Please sign in to comment.