Skip to content

Commit 3b20344

Browse files
committed
chore: fix ruff linting in tests and refine pre-commit config
1 parent 3d2e96b commit 3b20344

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

.pre-commit-config.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ repos:
1919
# Remove trailing whitespace
2020
- id: trailing-whitespace
2121
args: [--markdown-linebreak-ext=md]
22-
exclude: ^(.*\.min\.(js|css)|.*\.lock|.*\.log|.*\.pdf|.*\.zip|.*\.tar\.gz)
22+
exclude: ^(assets/roster/.*\.svg|.*\.min\.(js|css)|.*\.lock|.*\.log|.*\.pdf|.*\.zip|.*\.tar\.gz)
2323

2424
# Ensure files end with a newline
2525
- id: end-of-file-fixer
26-
exclude: ^(.*\.min\.(js|css)|.*\.lock|.*\.log|.*\.pdf|.*\.zip|.*\.tar\.gz)
26+
exclude: ^(assets/roster/.*\.svg|.*\.min\.(js|css)|.*\.lock|.*\.log|.*\.pdf|.*\.zip|.*\.tar\.gz)
2727

2828
# Check YAML files for syntax errors
2929
- id: check-yaml
@@ -55,11 +55,9 @@ repos:
5555
# Ruff linting - removing --exit-zero to ensure we catch issues before they land
5656
- id: ruff
5757
args: [--fix]
58-
files: ^(src/|scripts/).*\.py$
5958

6059
# Ruff import sorting
6160
- id: ruff-format
62-
files: ^(src/|scripts/).*\.py$
6361

6462
# ============================================
6563
# Frontend code formatting and linting
@@ -72,8 +70,9 @@ repos:
7270
# files: ^web/.*\.(js|jsx|ts|tsx)$
7371
# exclude: ^web/(node_modules|\.next|out|dist|build)/
7472
# additional_dependencies:
75-
# - eslint@^8.57.0
76-
# - eslint-config-next@14.0.3
73+
# - eslint@^9.0.0
74+
# - eslint-config-next@^15.0.0
75+
# - "@eslint/eslintrc"
7776
# args: [--fix]
7877

7978
- repo: https://github.com/pre-commit/mirrors-prettier

tests/agents/solve/utils/test_json_utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pytest
21
from src.agents.solve.utils.json_utils import extract_json_from_text
32

43

@@ -26,7 +25,6 @@ def foo():
2625
assert "def foo" in parsed["tool_calls"][0]["query"]
2726

2827

29-
3028
# How to run the test
3129
# From repo root:
3230
# pytest

tests/core/test_prompt_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
Unit tests for the unified PromptManager.
44
"""
55

6-
import pytest
76
from pathlib import Path
87
import sys
98

9+
import pytest
10+
1011
# Add project root to path
1112
project_root = Path(__file__).parent.parent.parent
1213
sys.path.insert(0, str(project_root))

0 commit comments

Comments
 (0)