style: adopt ruff (format + lint) at 88, replacing black/isort/flake8

Format-only: Python files are AST-identical apart from import order.
pre-commit end-of-file/trailing-whitespace fixes applied repo-wide.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
golem
2026-10-04 20:39:30 -06:00
co-authored by Claude Opus 5.5
parent a6e09a5796
commit bca4c38f98
19 changed files with 63 additions and 88 deletions
+7 -20
View File
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v6.0.0
hooks:
- id: check-yaml
- id: check-added-large-files
@@ -9,23 +9,10 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
# isort -- sorts imports
- repo: https://github.com/timothycrosley/isort
rev: 5.13.2
# ruff replaces black, isort and flake8. Keep rev equal to the ruff pin in pyproject.toml.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.10
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
# Flake8
- repo: https://github.com/pycqa/flake8
rev: '7.0.0'
hooks:
- id: flake8
# Black
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.2.0
hooks:
- id: black
language_version: python3.8
- id: ruff-check
args: [--fix]
- id: ruff-format