Adds .flake8 config and registers the flake8 pre-commit hook scoped to python/ at rev 7.3.0. Baseline ignore rules (E501, F401, F541, F841, E722, E402, E741, F811, F821, F824, E231) suppress existing violations so the hook passes cleanly on the current codebase. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
38 lines
912 B
YAML
38 lines
912 B
YAML
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v5.0.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
- id: check-json
|
|
- id: check-added-large-files
|
|
args: ["--maxkb=500"]
|
|
- id: check-merge-conflict
|
|
|
|
- repo: https://github.com/psf/black
|
|
rev: 26.3.1
|
|
hooks:
|
|
- id: black
|
|
language_version: python3
|
|
args: [--config=pyproject.toml]
|
|
|
|
- repo: https://github.com/pycqa/isort
|
|
rev: 8.0.1
|
|
hooks:
|
|
- id: isort
|
|
args: [--settings-path=pyproject.toml]
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
rev: v4.0.0-alpha.8
|
|
hooks:
|
|
- id: prettier
|
|
exclude: ^(dist/|package-lock\.json|\.venv/|python/)
|
|
|
|
- repo: https://github.com/pycqa/flake8
|
|
rev: "7.3.0"
|
|
hooks:
|
|
- id: flake8
|
|
files: ^python/
|
|
args: [--config=.flake8]
|