Skip to content

Commit

Permalink
remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
lobsterkatie committed May 18, 2024
1 parent 63571a2 commit 175a627
Show file tree
Hide file tree
Showing 22 changed files with 12 additions and 31 deletions.
1 change: 0 additions & 1 deletion src/seer/automation/autofix/components/planner/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from pydantic import BaseModel, StringConstraints
from pydantic_xml import attr, element

from seer.automation.autofix.components.assessment.models import ProblemDiscoveryOutput
from seer.automation.autofix.components.root_cause.models import RootCauseAnalysisItem
from seer.automation.component import BaseComponentOutput, BaseComponentRequest
from seer.automation.models import EventDetails, PromptXmlModel
Expand Down
2 changes: 0 additions & 2 deletions src/seer/automation/autofix/components/reranker/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import json
import textwrap

from pydantic import BaseModel
from pydantic_xml import element

from seer.automation.codebase.models import BaseDocumentChunk
Expand Down
2 changes: 1 addition & 1 deletion src/seer/automation/autofix/steps/create_index_step.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Type
from typing import Any

import sentry_sdk

Expand Down
4 changes: 0 additions & 4 deletions src/seer/automation/autofix/tools.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import json
import logging
import textwrap

from sentry_sdk.ai.monitoring import ai_track

from seer.automation.agent.client import GptClient
from seer.automation.agent.models import Message, Usage
from seer.automation.agent.tools import FunctionTool
from seer.automation.autofix.autofix_context import AutofixContext
from seer.automation.autofix.components.retriever import RetrieverRequest
Expand All @@ -19,7 +16,6 @@
from seer.automation.autofix.utils import find_original_snippet
from seer.automation.codebase.codebase_index import CodebaseIndex
from seer.automation.models import FileChange
from seer.automation.state import State

logger = logging.getLogger("autofix")

Expand Down
2 changes: 1 addition & 1 deletion src/seer/automation/codebase/ast.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pydantic import BaseModel
from tree_sitter import Node, Tree
from tree_sitter import Node


class AstDeclaration(BaseModel):
Expand Down
1 change: 0 additions & 1 deletion src/seer/automation/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from seer.automation.models import PromptXmlModel
from seer.automation.pipeline import PipelineContext
from seer.automation.state import State


class BaseComponentRequest(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion src/seer/automation/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import contextlib
import dataclasses
import functools
from typing import Any, Callable, Generic, Iterator, Type, TypeVar, cast
from typing import Any, Generic, Iterator, Type, TypeVar, cast

from celery import Task
from pydantic import BaseModel
Expand Down
1 change: 0 additions & 1 deletion src/seer/automation/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import functools
import logging
import os
from typing import Any

import billiard # type: ignore[import-untyped]
import torch
Expand Down
2 changes: 1 addition & 1 deletion src/seer/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
)
from sqlalchemy.dialects.postgresql import insert
from sqlalchemy.ext.asyncio import async_sessionmaker
from sqlalchemy.orm import DeclarativeBase, Mapped, deferred, mapped_column, sessionmaker
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column, sessionmaker


class Base(DeclarativeBase):
Expand Down
2 changes: 1 addition & 1 deletion src/seer/generate_schemas.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
import os.path
from typing import Dict, Generator, Iterable, Iterator, List, Optional, Set, Union
from typing import Generator, Iterator, List, Optional, Set, Union

root = os.path.abspath(os.path.join(__file__, ".."))

Expand Down
3 changes: 1 addition & 2 deletions src/seer/grouping/grouping.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import difflib
import logging
from typing import List, Mapping, Optional
from typing import List, Optional

import numpy as np
import pandas as pd
import sentry_sdk
import torch
from pydantic import BaseModel, ValidationInfo, field_validator
Expand Down
1 change: 0 additions & 1 deletion src/seer/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from dateutil.relativedelta import relativedelta
from sentry_sdk.integrations.asyncio import AsyncioIntegration
from sqlalchemy import func, select, text
from sqlalchemy.ext.asyncio import async_sessionmaker

from seer.db import AsyncSession, ProcessRequest
from seer.task_factory import AsyncTaskFactory, _async_task_factories
Expand Down
1 change: 0 additions & 1 deletion src/seer/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import contextlib
import functools
import json
import sys
import weakref
from enum import Enum
from queue import Empty, Full, Queue
Expand Down
4 changes: 2 additions & 2 deletions tests/automation/agent/test_agent.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import unittest
from unittest.mock import MagicMock, patch
from unittest.mock import MagicMock

from seer.automation.agent.agent import GptAgent
from seer.automation.agent.models import Message, ToolCall
from seer.automation.agent.models import ToolCall
from seer.automation.agent.tools import FunctionTool


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from seer.automation.autofix.models import AutofixRequest
from seer.automation.autofix.steps.create_missing_indexes_chain import CreateMissingIndexesStep
from seer.automation.autofix.steps.update_index_step import UpdateIndexStep
from seer.automation.models import RepoDefinition
from seer.automation.steps import ParallelizedChainStepRequest

Expand Down
2 changes: 1 addition & 1 deletion tests/automation/autofix/test_autofix_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from seer.automation.autofix.state import ContinuationState
from seer.automation.codebase.models import QueryResultDocumentChunk, RepositoryInfo
from seer.automation.models import FileChange, IssueDetails, SentryEventData
from seer.automation.state import DbState, LocalMemoryState
from seer.automation.state import LocalMemoryState
from seer.db import DbPrIdToAutofixRunIdMapping, Session


Expand Down
2 changes: 1 addition & 1 deletion tests/automation/codebase/test_parser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from unittest.mock import MagicMock, patch
from unittest.mock import MagicMock

from sentence_transformers import SentenceTransformer
from tree_sitter import Node, Parser
Expand Down
2 changes: 1 addition & 1 deletion tests/automation/codebase/test_repo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pydantic import ValidationError

from seer.automation.codebase.repo_client import RepoClient
from seer.automation.models import InitializationError, RepoDefinition
from seer.automation.models import RepoDefinition


class TestRepoClient(unittest.TestCase):
Expand Down
3 changes: 1 addition & 2 deletions tests/automation/test_steps.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import unittest
from typing import Type
from unittest.mock import MagicMock, patch
from unittest.mock import MagicMock

from src.seer.automation.steps import (
ConditionalStep,
Expand Down
2 changes: 0 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import asyncio
import os

import pytest
from sqlalchemy import text
from sqlalchemy.ext.asyncio import create_async_engine

from seer.bootup import CELERY_CONFIG, bootup
from seer.db import Session, db
Expand Down
1 change: 0 additions & 1 deletion tests/generators.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import contextlib
import dataclasses
import datetime
import hashlib
from typing import Annotated, Iterator
from unittest import mock

Expand Down
2 changes: 0 additions & 2 deletions tests/test_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

import pytest
from aiohttp import ClientResponseError
from johen import gen
from johen.pytest import parametrize
from pydantic import BaseModel
from requests.models import HTTPError

from seer.automation.autofix.models import AutofixCompleteArgs, AutofixStepUpdateArgs
Expand Down

0 comments on commit 175a627

Please sign in to comment.