diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 35cc0c3..c0c381f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,15 +1,12 @@ -default_language_version: - python: python3.13 - repos: - repo: https://github.com/psf/black - rev: 25.11.0 + rev: 26.5.1 hooks: - id: black files: ^pandas_ta_classic/ - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.13 + rev: v0.15.20 hooks: - id: ruff args: [--select, "E9,F63,F7,F82"] diff --git a/AGENTS.md b/AGENTS.md index e9aa1e6..668c786 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -131,6 +131,7 @@ After each coding session, execute the code/module in local venv and troubleshoo - Config in `pyproject.toml` under `[tool.black]` and `[tool.ruff]` - If black and ruff format disagree on a region, lock it with `# fmt: off` / `# fmt: on` - **Gate condition:** `black --check --diff pandas_ta_classic/` and `ruff check pandas_ta_classic --select E9,F63,F7,F82` must both return EXIT=0 before the task is considered complete. If black reports a reformat, run `black pandas_ta_classic/` then re-check. +- **Dual config pattern:** black/ruff versions appear in two places — `pyproject.toml` under `[project.optional-dependencies].lint` (CI installs via `pip install -e ".[lint]"`) AND `.pre-commit-config.yaml` under each hook's `rev`. When bumping a version, update BOTH. Versions must be kept in sync. ## Imports and Paths diff --git a/pyproject.toml b/pyproject.toml index b65258f..aafae70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,8 +59,8 @@ oracle = [ # CI code quality tools lint = [ - "ruff>=0.6.0", - "black==26.3.1", + "ruff>=0.15.20", + "black>=26.5.1", ] # PyPI publishing tools