Merge pull request #244 from ScrapeGraphAI/main

feat: removed unused imports
This commit is contained in:
Marko Kraemer 2025-05-08 16:43:38 +02:00 committed by GitHub
commit 75823fca3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 24 additions and 38 deletions

View File

@ -4,8 +4,8 @@ import base64
import aiohttp
import asyncio
import logging
from typing import Optional, Dict, Any, Union
from PIL import Image
from typing import Optional, Dict
import os
from agentpress.tool import Tool, ToolResult, openapi_schema, xml_schema
from sandbox.sandbox import SandboxToolsBase, Sandbox

View File

@ -1,4 +1,4 @@
from typing import Dict, Optional
from typing import Dict
from agent.tools.data_providers.RapidDataProviderBase import RapidDataProviderBase, EndpointSchema

View File

@ -1,4 +1,3 @@
import os
from typing import List, Optional, Union
from agentpress.tool import Tool, ToolResult, openapi_schema, xml_schema

View File

@ -3,7 +3,7 @@ import json
from agentpress.tool import ToolResult, openapi_schema, xml_schema
from agentpress.thread_manager import ThreadManager
from sandbox.sandbox import SandboxToolsBase, Sandbox
from sandbox.sandbox import SandboxToolsBase
from utils.logger import logger

View File

@ -1,7 +1,7 @@
import os
from dotenv import load_dotenv
from agentpress.tool import ToolResult, openapi_schema, xml_schema
from sandbox.sandbox import SandboxToolsBase, Sandbox
from sandbox.sandbox import SandboxToolsBase
from utils.files_utils import clean_path
from agentpress.thread_manager import ThreadManager

View File

@ -1,6 +1,5 @@
from typing import Optional
from agentpress.tool import ToolResult, openapi_schema, xml_schema
from sandbox.sandbox import SandboxToolsBase, Sandbox
from sandbox.sandbox import SandboxToolsBase
from agentpress.thread_manager import ThreadManager
class SandboxExposeTool(SandboxToolsBase):

View File

@ -1,9 +1,7 @@
from daytona_sdk.process import SessionExecuteRequest
from typing import Optional
from agentpress.tool import ToolResult, openapi_schema, xml_schema
from sandbox.sandbox import SandboxToolsBase, Sandbox, get_or_start_sandbox
from utils.files_utils import EXCLUDED_FILES, EXCLUDED_DIRS, EXCLUDED_EXT, should_exclude_file, clean_path
from sandbox.sandbox import SandboxToolsBase
from utils.files_utils import should_exclude_file, clean_path
from agentpress.thread_manager import ThreadManager
from utils.logger import logger
import os

View File

@ -1,7 +1,7 @@
from typing import Optional, Dict, List
from typing import Optional, Dict
from uuid import uuid4
from agentpress.tool import ToolResult, openapi_schema, xml_schema
from sandbox.sandbox import SandboxToolsBase, Sandbox
from sandbox.sandbox import SandboxToolsBase
from agentpress.thread_manager import ThreadManager
class SandboxShellTool(SandboxToolsBase):

View File

@ -4,7 +4,7 @@ import mimetypes
from typing import Optional
from agentpress.tool import ToolResult, openapi_schema, xml_schema
from sandbox.sandbox import SandboxToolsBase, Sandbox
from sandbox.sandbox import SandboxToolsBase
from agentpress.thread_manager import ThreadManager
from utils.logger import logger
import json

View File

@ -1,8 +1,5 @@
from tavily import AsyncTavilyClient
import httpx
from typing import List, Optional
from datetime import datetime
import os
from dotenv import load_dotenv
from agentpress.tool import Tool, ToolResult, openapi_schema, xml_schema
from utils.config import config

View File

@ -8,7 +8,7 @@ reaching the context window limitations of LLM models.
import json
from typing import List, Dict, Any, Optional
from litellm import token_counter, completion, completion_cost
from litellm import token_counter, completion_cost
from services.supabase import DBConnection
from services.llm import make_llm_api_call
from utils.logger import logger

View File

@ -16,7 +16,7 @@ from typing import List, Dict, Any, Optional, Tuple, AsyncGenerator, Callable, U
from dataclasses import dataclass
from datetime import datetime, timezone
from litellm import completion_cost, token_counter
from litellm import completion_cost
from agentpress.tool import Tool, ToolResult
from agentpress.tool_registry import ToolRegistry

View File

@ -7,7 +7,7 @@ This module defines the base classes and decorators for creating tools in AgentP
- Result containers for standardized tool outputs
"""
from typing import Dict, Any, Union, Optional, List, Type
from typing import Dict, Any, Union, Optional, List
from dataclasses import dataclass, field
from abc import ABC
import json

View File

@ -1,5 +1,5 @@
from typing import Dict, Type, Any, List, Optional, Callable
from agentpress.tool import Tool, SchemaType, ToolSchema
from agentpress.tool import Tool, SchemaType
from utils.logger import logger

View File

@ -1,12 +1,12 @@
import os
from typing import List, Optional
from typing import Optional
from fastapi import FastAPI, UploadFile, File, HTTPException, APIRouter, Form, Depends, Request
from fastapi.responses import Response, JSONResponse
from fastapi.responses import Response
from pydantic import BaseModel
from utils.logger import logger
from utils.auth_utils import get_current_user_id_from_jwt, get_user_id_from_stream_auth, get_optional_user_id
from utils.auth_utils import get_optional_user_id
from sandbox.sandbox import get_or_start_sandbox
from services.supabase import DBConnection
from agent.api import get_or_create_project_sandbox

View File

@ -1,11 +1,10 @@
from fastapi import FastAPI, APIRouter, HTTPException, Body
from playwright.async_api import async_playwright, Browser, Page, ElementHandle
from playwright.async_api import async_playwright, Browser, Page
from pydantic import BaseModel
from typing import Optional, List, Dict, Any, Union
from typing import Optional, List, Dict, Any
import asyncio
import json
import logging
import re
import base64
from dataclasses import dataclass, field
from datetime import datetime

View File

@ -1,4 +1,3 @@
import os
from typing import Optional
from daytona_sdk import Daytona, DaytonaConfig, CreateSandboxParams, Sandbox, SessionExecuteRequest

View File

@ -5,14 +5,14 @@ stripe listen --forward-to localhost:8000/api/billing/webhook
"""
from fastapi import APIRouter, HTTPException, Depends, Request
from typing import Optional, Dict, Any, List, Tuple
from typing import Optional, Dict, Tuple
import stripe
from datetime import datetime, timezone
from utils.logger import logger
from utils.config import config, EnvMode
from services.supabase import DBConnection
from utils.auth_utils import get_current_user_id_from_jwt
from pydantic import BaseModel, Field
from pydantic import BaseModel
# Initialize Stripe
stripe.api_key = config.STRIPE_SECRET_KEY

View File

@ -18,8 +18,6 @@ from openai import OpenAIError
import litellm
from utils.logger import logger
from utils.config import config
from datetime import datetime
import traceback
# litellm.set_verbose=True
litellm.modify_params=True

View File

@ -2,7 +2,6 @@
Centralized database connection management for AgentPress using Supabase.
"""
import os
from typing import Optional
from supabase import create_async_client, AsyncClient
from utils.logger import logger

View File

@ -1,8 +1,7 @@
from fastapi import HTTPException, Request, Depends
from typing import Optional, List, Dict, Any
from fastapi import HTTPException, Request
from typing import Optional
import jwt
from jwt.exceptions import PyJWTError
from utils.logger import logger
# This function extracts the user ID from Supabase JWT
async def get_current_user_id_from_jwt(request: Request) -> str:

View File

@ -13,7 +13,6 @@ import json
import sys
import os
from datetime import datetime
from typing import Any, Dict, Optional
from contextvars import ContextVar
from functools import wraps
import traceback