DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.
Python ai-agentsai-tutorclawbotcli-tooldeepresearchinteractive-learninglearningmulti-agent-systemsrag
chore: fix ruff linting in tests and refine pre-commit config
RinCodeForge9273b203440545f
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex c1ca777bc..3410da9cc 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -19,11 +19,11 @@ repos:# Remove trailing whitespace- id: trailing-whitespaceargs: [--markdown-linebreak-ext=md]- exclude: ^(.*\.min\.(js|css)|.*\.lock|.*\.log|.*\.pdf|.*\.zip|.*\.tar\.gz)+ exclude: ^(assets/roster/.*\.svg|.*\.min\.(js|css)|.*\.lock|.*\.log|.*\.pdf|.*\.zip|.*\.tar\.gz)# Ensure files end with a newline- id: end-of-file-fixer- exclude: ^(.*\.min\.(js|css)|.*\.lock|.*\.log|.*\.pdf|.*\.zip|.*\.tar\.gz)+ exclude: ^(assets/roster/.*\.svg|.*\.min\.(js|css)|.*\.lock|.*\.log|.*\.pdf|.*\.zip|.*\.tar\.gz)# Check YAML files for syntax errors- id: check-yaml@@ -55,11 +55,9 @@ repos:# Ruff linting - removing --exit-zero to ensure we catch issues before they land- id: ruffargs: [--fix]- files: ^(src/|scripts/).*\.py$# Ruff import sorting- id: ruff-format- files: ^(src/|scripts/).*\.py$# ============================================# Frontend code formatting and linting@@ -72,8 +70,9 @@ repos:# files: ^web/.*\.(js|jsx|ts|tsx)$# exclude: ^web/(node_modules|\.next|out|dist|build)/# additional_dependencies:- # - eslint@^8.57.0- # - [email protected]+ # - eslint@^9.0.0+ # - eslint-config-next@^15.0.0+ # - "@eslint/eslintrc"# args: [--fix]- repo: https://github.com/pre-commit/mirrors-prettierdiff --git a/tests/agents/solve/utils/test_json_utils.py b/tests/agents/solve/utils/test_json_utils.pyindex 4c80b3093..8dcc07171 100644--- a/tests/agents/solve/utils/test_json_utils.py+++ b/tests/agents/solve/utils/test_json_utils.py@@ -1,4 +1,3 @@-import pytestfrom src.agents.solve.utils.json_utils import extract_json_from_text@@ -26,7 +25,6 @@ def foo():assert "def foo" in parsed["tool_calls"][0]["query"]-# How to run the test# From repo root:# pytestdiff --git a/tests/core/test_prompt_manager.py b/tests/core/test_prompt_manager.pyindex 6c613ec4b..991149197 100644--- a/tests/core/test_prompt_manager.py+++ b/tests/core/test_prompt_manager.py@@ -3,10 +3,11 @@Unit tests for the unified PromptManager."""-import pytestfrom pathlib import Pathimport sys+import pytest+# Add project root to pathproject_root = Path(__file__).parent.parent.parentsys.path.insert(0, str(project_root))