moved TC001 expetop out of pyproject.toml
This commit is contained in:
@@ -8,11 +8,13 @@ from fastapi import APIRouter, Request
|
|||||||
from fastapi.responses import HTMLResponse
|
from fastapi.responses import HTMLResponse
|
||||||
|
|
||||||
from python.ebook_search.api.bm25_tasks import schedule_bm25_refresh
|
from python.ebook_search.api.bm25_tasks import schedule_bm25_refresh
|
||||||
from python.ebook_search.api.dependencies import AppConfig
|
from python.ebook_search.api.dependencies import (
|
||||||
|
AppConfig, # noqa: TC001 FastAPI resolves this annotated dependency at runtime
|
||||||
|
)
|
||||||
from python.ebook_search.api.web import templates
|
from python.ebook_search.api.web import templates
|
||||||
from python.ebook_search.embeddings import embed_missing_chunks, embedding_model_stats
|
from python.ebook_search.embeddings import embed_missing_chunks, embedding_model_stats
|
||||||
from python.ebook_search.ingest import ingest_configured_paths
|
from python.ebook_search.ingest import ingest_configured_paths
|
||||||
from python.fastapi_tools import DbSession
|
from python.fastapi_tools import DbSession # noqa: TC001 FastAPI resolves this annotated dependency at runtime
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,12 @@ from fastapi.responses import JSONResponse
|
|||||||
from sqlalchemy import literal, select
|
from sqlalchemy import literal, select
|
||||||
from sqlalchemy.exc import SQLAlchemyError
|
from sqlalchemy.exc import SQLAlchemyError
|
||||||
|
|
||||||
from python.ebook_search.api.dependencies import AppConfig
|
from python.ebook_search.api.dependencies import (
|
||||||
|
AppConfig, # noqa: TC001 FastAPI resolves this annotated dependency at runtime
|
||||||
|
)
|
||||||
from python.ebook_search.bm25_corpus import bm25_index_exists, bm25_index_path, read_bm25_manifest
|
from python.ebook_search.bm25_corpus import bm25_index_exists, bm25_index_path, read_bm25_manifest
|
||||||
from python.ebook_search.llm_interface import check_chat_endpoint, check_embedding_endpoint
|
from python.ebook_search.llm_interface import check_chat_endpoint, check_embedding_endpoint
|
||||||
from python.fastapi_tools import DbSession
|
from python.fastapi_tools import DbSession # noqa: TC001 FastAPI resolves this annotated dependency at runtime
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|||||||
@@ -8,9 +8,11 @@ from fastapi import APIRouter, Request
|
|||||||
from fastapi.responses import HTMLResponse
|
from fastapi.responses import HTMLResponse
|
||||||
from sqlalchemy import select
|
from sqlalchemy import select
|
||||||
|
|
||||||
from python.ebook_search.api.dependencies import AppConfig
|
from python.ebook_search.api.dependencies import (
|
||||||
|
AppConfig, # noqa: TC001 FastAPI resolves this annotated dependency at runtime
|
||||||
|
)
|
||||||
from python.ebook_search.api.web import templates
|
from python.ebook_search.api.web import templates
|
||||||
from python.fastapi_tools import DbSession
|
from python.fastapi_tools import DbSession # noqa: TC001 FastAPI resolves this annotated dependency at runtime
|
||||||
from python.orm.richie import EbookSource
|
from python.orm.richie import EbookSource
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|||||||
@@ -5,15 +5,17 @@ from __future__ import annotations
|
|||||||
import logging
|
import logging
|
||||||
from dataclasses import replace
|
from dataclasses import replace
|
||||||
from time import perf_counter
|
from time import perf_counter
|
||||||
from typing import Annotated
|
from typing import TYPE_CHECKING, Annotated
|
||||||
|
|
||||||
from fastapi import APIRouter, Form, Request
|
from fastapi import APIRouter, Form, Request
|
||||||
from fastapi.responses import HTMLResponse
|
from fastapi.responses import HTMLResponse
|
||||||
|
|
||||||
from python.ebook_search.answer import answer_query
|
from python.ebook_search.answer import answer_query
|
||||||
from python.ebook_search.api.dependencies import AppConfig, AppEngine
|
from python.ebook_search.api.dependencies import ( # noqa: TC001 FastAPI resolves these annotated dependencies at runtime
|
||||||
|
AppConfig,
|
||||||
|
AppEngine,
|
||||||
|
)
|
||||||
from python.ebook_search.api.web import templates
|
from python.ebook_search.api.web import templates
|
||||||
from python.ebook_search.config import EbookSearchConfig
|
|
||||||
from python.ebook_search.guardrails import (
|
from python.ebook_search.guardrails import (
|
||||||
CitationReport,
|
CitationReport,
|
||||||
is_confident,
|
is_confident,
|
||||||
@@ -23,6 +25,9 @@ from python.ebook_search.guardrails import (
|
|||||||
from python.ebook_search.search import SearchResponse, search_ebooks
|
from python.ebook_search.search import SearchResponse, search_ebooks
|
||||||
from python.ebook_search.timing import runtime_step_from_start
|
from python.ebook_search.timing import runtime_step_from_start
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from python.ebook_search.config import EbookSearchConfig
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
Reference in New Issue
Block a user