lint(forge): `black .` and `isort .`

pull/6731/head
Reinier van der Leer 2024-01-16 16:30:37 +01:00
parent f0ede64ded
commit 39fd1d6be1
No known key found for this signature in database
GPG Key ID: CDC1180FDAE06193
13 changed files with 44 additions and 32 deletions

View File

@ -41,5 +41,9 @@ if __name__ == "__main__":
forge.sdk.forge_log.setup_logger()
uvicorn.run(
"forge.app:app", host="localhost", port=int(port), log_level="error", reload=True
"forge.app:app",
host="localhost",
port=int(port),
log_level="error",
reload=True,
)

View File

@ -1 +1 @@
from .registry import ActionRegister, Action, action, ActionParameter
from .registry import Action, ActionParameter, ActionRegister, action

View File

@ -1,4 +1,5 @@
from sdk.forge_log import ForgeLogger
from .registry import action
logger = ForgeLogger(__name__)

View File

@ -5,13 +5,16 @@ from __future__ import annotations
COMMAND_CATEGORY = "web_browse"
COMMAND_CATEGORY_TITLE = "Web Browsing"
import functools
import logging
import re
from pathlib import Path
from sys import platform
from typing import TYPE_CHECKING, Optional, Type, List, Tuple
from typing import TYPE_CHECKING, Any, Callable, List, Optional, Tuple, Type
from urllib.parse import urljoin, urlparse
from bs4 import BeautifulSoup
from requests.compat import urljoin
from selenium.common.exceptions import WebDriverException
from selenium.webdriver.chrome.options import Options as ChromeOptions
from selenium.webdriver.chrome.service import Service as ChromeDriverService
@ -33,19 +36,9 @@ from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.firefox import GeckoDriverManager
from webdriver_manager.microsoft import EdgeChromiumDriverManager as EdgeDriverManager
from forge.sdk.errors import CommandExecutionError
from ..registry import action
from forge.sdk.errors import *
import functools
import re
from typing import Any, Callable
from urllib.parse import urljoin, urlparse
from requests.compat import urljoin
from bs4 import BeautifulSoup
from requests.compat import urljoin
def extract_hyperlinks(soup: BeautifulSoup, base_url: str) -> list[tuple[str, str]]:

View File

@ -1,3 +1,4 @@
from forge.actions import ActionRegister
from forge.sdk import (
Agent,
AgentDB,
@ -8,8 +9,6 @@ from forge.sdk import (
TaskRequestBody,
Workspace,
)
from forge.actions import ActionRegister
LOG = ForgeLogger(__name__)

View File

@ -2,6 +2,7 @@ import os
from forge.agent import ForgeAgent
from forge.sdk import LocalWorkspace
from .db import ForgeDatabase
database_name = os.getenv("DATABASE_STRING")

View File

@ -1,13 +1,10 @@
from .sdk import AgentDB, ForgeLogger, NotFoundError, Base
import datetime
import uuid
from sqlalchemy import Column, DateTime, String
from sqlalchemy.exc import SQLAlchemyError
import datetime
from sqlalchemy import (
Column,
DateTime,
String,
)
import uuid
from .sdk import AgentDB, Base, ForgeLogger, NotFoundError
LOG = ForgeLogger(__name__)

View File

@ -1,2 +1,2 @@
from .memstore import MemStore
from .chroma_memstore import ChromaMemStore
from .memstore import MemStore

View File

@ -1,8 +1,9 @@
from .memstore import MemStore
import hashlib
import chromadb
from chromadb.config import Settings
import hashlib
from .memstore import MemStore
class ChromaMemStore:

View File

@ -2,11 +2,11 @@
The Forge SDK. This is the core of the Forge. It contains the agent protocol, which is the
core of the Forge.
"""
from ..llm import chat_completion_request, create_embedding_request, transcribe_audio
from .agent import Agent
from .db import AgentDB, Base
from .errors import *
from .forge_log import ForgeLogger
from ..llm import chat_completion_request, create_embedding_request, transcribe_audio
from .prompting import PromptEngine
from .model import (
Artifact,
ArtifactUpload,
@ -21,5 +21,5 @@ from .model import (
TaskRequestBody,
TaskStepsListResponse,
)
from .prompting import PromptEngine
from .workspace import LocalWorkspace, Workspace
from .errors import *

View File

@ -13,8 +13,17 @@ from .db import AgentDB
from .errors import NotFoundError
from .forge_log import ForgeLogger
from .middlewares import AgentMiddleware
from .model import (
Artifact,
Step,
StepRequestBody,
Task,
TaskArtifactsListResponse,
TaskListResponse,
TaskRequestBody,
TaskStepsListResponse,
)
from .routes.agent_protocol import base_router
from .model import *
from .workspace import Workspace
LOG = ForgeLogger(__name__)

View File

@ -14,7 +14,13 @@ from forge.sdk.db import (
convert_to_task,
)
from forge.sdk.errors import NotFoundError as DataNotFoundError
from autogpts.forge.forge.sdk.model import *
from forge.sdk.model import (
Artifact,
Status,
Step,
StepRequestBody,
Task,
)
@pytest.mark.asyncio

View File

@ -2,6 +2,7 @@ import abc
import os
import typing
from pathlib import Path
from google.cloud import storage