build(deps): bump and align black, ruff versions

Bump black 26.3.1→26.5.1 and ruff 0.6.0→0.15.20 in pyproject.toml.
Unpin black (== → >=) to match ruff convention.
Sync .pre-commit-config.yaml revs to match.
Drop default_language_version — hooks work on any Python ≥3.10.
Document dual-config pattern in AGENTS.md to prevent future drift.
This commit is contained in:
xgboosted
2026-06-28 18:51:05 +10:00
parent d279ed7ce3
commit c97c1603e9
3 changed files with 5 additions and 7 deletions
+2 -5
View File
@@ -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"]
+1
View File
@@ -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
+2 -2
View File
@@ -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