diff --git a/src/cocoindex_code/indexer.py b/src/cocoindex_code/indexer.py index 4713e8e..733d30e 100644 --- a/src/cocoindex_code/indexer.py +++ b/src/cocoindex_code/indexer.py @@ -2,8 +2,8 @@ from __future__ import annotations -from pathlib import Path, PurePath from collections.abc import Iterable +from pathlib import Path, PurePath import cocoindex as coco from cocoindex.connectors import localfs, sqlite @@ -15,7 +15,14 @@ from pathspec import GitIgnoreSpec from .settings import PROJECT_SETTINGS -from .shared import CODEBASE_DIR, EMBEDDER, EXT_LANG_OVERRIDE_MAP, GITIGNORE_SPEC, SQLITE_DB, CodeChunk +from .shared import ( + CODEBASE_DIR, + EMBEDDER, + EXT_LANG_OVERRIDE_MAP, + GITIGNORE_SPEC, + SQLITE_DB, + CodeChunk, +) # Chunking configuration CHUNK_SIZE = 800 diff --git a/src/cocoindex_code/project.py b/src/cocoindex_code/project.py index 035216e..46a0efa 100644 --- a/src/cocoindex_code/project.py +++ b/src/cocoindex_code/project.py @@ -12,7 +12,14 @@ from .indexer import indexer_main from .protocol import IndexingProgress from .settings import PROJECT_SETTINGS, ProjectSettings, load_gitignore_spec -from .shared import CODEBASE_DIR, EMBEDDER, EXT_LANG_OVERRIDE_MAP, GITIGNORE_SPEC, SQLITE_DB, Embedder +from .shared import ( + CODEBASE_DIR, + EMBEDDER, + EXT_LANG_OVERRIDE_MAP, + GITIGNORE_SPEC, + SQLITE_DB, + Embedder, +) class Project: diff --git a/src/cocoindex_code/shared.py b/src/cocoindex_code/shared.py index e90addd..319ff17 100644 --- a/src/cocoindex_code/shared.py +++ b/src/cocoindex_code/shared.py @@ -9,8 +9,8 @@ import cocoindex as coco from cocoindex.connectors import sqlite -from pathspec import GitIgnoreSpec from numpy.typing import NDArray +from pathspec import GitIgnoreSpec if TYPE_CHECKING: from cocoindex.ops.litellm import LiteLLMEmbedder diff --git a/tests/test_e2e.py b/tests/test_e2e.py index 80833c7..9c29b56 100644 --- a/tests/test_e2e.py +++ b/tests/test_e2e.py @@ -14,9 +14,9 @@ from pathlib import Path import pytest +from cocoindex.connectors import sqlite as coco_sqlite from typer.testing import CliRunner -from cocoindex.connectors import sqlite as coco_sqlite from cocoindex_code.cli import app from cocoindex_code.client import stop_daemon from cocoindex_code.settings import find_parent_with_marker @@ -319,8 +319,7 @@ def test_session_respects_gitignore(e2e_project: Path) -> None: try: with conn.readonly() as db: file_paths = { - row[0] - for row in db.execute("SELECT DISTINCT file_path FROM code_chunks_vec") + row[0] for row in db.execute("SELECT DISTINCT file_path FROM code_chunks_vec") } finally: conn.close()