Skip to content

Commit aa0207b

Browse files
authored
chore: make sure pytest always run in precommit (#64)
* chore: make sure `pytest` always run in precommit * chore: use uv python for sqlite extension * fix: path for windows
1 parent e602332 commit aa0207b

3 files changed

Lines changed: 2 additions & 9 deletions

File tree

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,13 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323

24-
- name: Set up Python
25-
uses: actions/setup-python@v5
26-
with:
27-
python-version: ${{ matrix.python-version }}
28-
allow-prereleases: true
29-
3024
- name: Install uv
3125
uses: astral-sh/setup-uv@v5
3226
with:
3327
enable-cache: true
3428

3529
- name: Install dependencies
36-
run: uv sync
30+
run: uv sync --python ${{ matrix.python-version }} --python-preference only-managed
3731

3832
- name: Run prek
3933
run: uv run prek run --all-files

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,3 @@ repos:
3535
entry: uv run pytest tests/ -v
3636
language: system
3737
pass_filenames: false
38-
stages: [pre-push]

src/cocoindex_code/indexer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ async def process(
116116
table.declare_row(
117117
row=CodeChunk(
118118
id=await id_gen.next_id(chunk.text),
119-
file_path=str(file.file_path.path),
119+
file_path=file.file_path.path.as_posix(),
120120
language=language,
121121
content=chunk.text,
122122
start_line=chunk.start.line,

0 commit comments

Comments
 (0)