Skip to content

Commit fe15510

Browse files
committed
refactor: fix import order across lib directory
Apply ruff auto-fix for import ordering (--select I) to maintain consistent import style across the codebase.
1 parent c98583f commit fe15510

19 files changed

+21
-24
lines changed

lib/advanced_search_features.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
import argparse
66
import json
7-
from typing import Any
87
from datetime import datetime
8+
from typing import Any
99

1010
from lib.db.postgres_client import PostgresClient
1111
from lib.embeddings.google_client import GoogleEmbeddingClient

lib/chat_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
from datetime import datetime
99
from typing import Any
1010

11-
from psycopg import errors as pg_errors
1211
from google import genai
1312
from google.genai.types import GenerateContentConfig
13+
from psycopg import errors as pg_errors
1414
from tenacity import (
1515
retry,
1616
stop_after_attempt,
1717
wait_exponential,
1818
)
1919

20-
from lib.db.postgres_client import PostgresClient
2120
from lib.db.chat_schema import ensure_chat_schema
2221
from lib.db.pgvector import vector_literal
22+
from lib.db.postgres_client import PostgresClient
2323
from lib.embeddings.google_client import GoogleEmbeddingClient
2424
from lib.id_generators import normalize_label
2525

lib/db/chat_schema.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
from typing import Any
1111

12-
1312
CHAT_SCHEMA_STATEMENTS: tuple[str, ...] = (
1413
"""
1514
CREATE TABLE IF NOT EXISTS chat_threads (

lib/embeddings/google_client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
from typing import Any
66

77
from google import genai
8-
from google.genai import types
9-
from google.genai import errors
8+
from google.genai import errors, types
109
from tenacity import (
1110
retry,
11+
retry_if_exception_type,
1212
stop_after_attempt,
1313
wait_exponential,
14-
retry_if_exception_type,
1514
)
1615

1716
from lib.utils.config import config

lib/gemini_finish_reason.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from typing import Any
66

7-
87
RETRYABLE_FINISH_REASONS = {"RECITATION"}
98

109

lib/google_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import json
44
import os
55
from pathlib import Path
6+
from typing import Any
67

78
from google import genai
89
from google.genai.types import GenerateContentConfig
9-
from typing import Any
1010

1111

1212
class GeminiClient:

lib/kg_hybrid_graph_rag.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

3-
import re
43
import json
4+
import re
55
from typing import Any
66

77
from lib.db.pgvector import vector_literal
@@ -257,6 +257,7 @@ def _rerank_with_gemini(
257257

258258
try:
259259
from google import genai
260+
260261
from lib.utils.config import config
261262

262263
client = genai.Client(api_key=config.embedding.api_key)

lib/knowledge_graph/base_kg_seeder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
from typing import Any
66

7+
from lib.db.pgvector import vector_literal
78
from lib.db.postgres_client import PostgresClient
89
from lib.embeddings.google_client import GoogleEmbeddingClient
910
from lib.id_generators import generate_kg_node_id, normalize_label
10-
from lib.db.pgvector import vector_literal
1111

1212

1313
class BaseKGSeeder:

lib/knowledge_graph/cleanup/candidates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
from lib.knowledge_graph.cleanup.normalize import (
1111
extract_initials,
1212
extract_surname,
13-
strip_honorifics,
1413
normalize_for_matching,
14+
strip_honorifics,
1515
)
1616

1717

lib/knowledge_graph/kg_extractor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
wait_exponential,
1515
)
1616

17+
from lib.db.pgvector import vector_literal
1718
from lib.db.postgres_client import PostgresClient
1819
from lib.embeddings.google_client import GoogleEmbeddingClient
1920
from lib.id_generators import generate_kg_edge_id, generate_kg_node_id, normalize_label
20-
from lib.db.pgvector import vector_literal
2121
from lib.knowledge_graph.window_builder import (
2222
ConceptWindow,
2323
Window,

0 commit comments

Comments
 (0)