Reorganize pre-commit hooks for improved readability and consistency

This commit is contained in:
William Valentin
2025-07-26 12:06:53 -07:00
parent dddf28ecc0
commit 3d5b3afbbb

View File

@@ -1,41 +1,58 @@
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0 rev: v5.0.0
hooks: hooks:
- id: check-yaml - id: check-added-large-files
- id: end-of-file-fixer - id: check-yaml
- id: trailing-whitespace - id: end-of-file-fixer
- id: check-added-large-files - id: trailing-whitespace
- id: check-merge-conflict - id: check-added-large-files
- id: check-json - id: check-merge-conflict
- id: check-case-conflict - id: check-json
- id: check-ast - id: check-case-conflict
- id: check-xml - id: check-ast
- id: check-symlinks - id: check-xml
- id: check-executables-have-shebangs - id: check-symlinks
# - id: check-docstring-first - id: check-executables-have-shebangs
- id: check-toml
- id: detect-private-key
# - id: detect-aws-credentials
# - id: check-docstring-first
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 25.1.0 rev: 25.1.0
hooks: hooks:
- id: black - id: black
- repo: https://github.com/pycqa/flake8 - repo: https://github.com/pycqa/flake8
rev: "7.3.0" # Use a specific, stable version of Flake8 rev: "7.3.0" # Use a specific, stable version of Flake8
hooks: hooks:
- id: flake8 - id: flake8
# - repo: https://github.com/PyCQA/pylint # - repo: https://github.com/PyCQA/pylint
# rev: v3.3.7 # rev: v3.3.7
# hooks: # hooks:
# - id: pylint # - id: pylint
# additional_dependencies: # additional_dependencies:
# - docstring # - docstring
# - repo: https://github.com/PyCQA/isort # - repo: https://github.com/PyCQA/isort
# rev: 6.0.1 # rev: 6.0.1
# hooks: # hooks:
# - id: isort # - id: isort
# additional_dependencies: # additional_dependencies:
# - docstring # - docstring
- repo: https://github.com/hhatto/autopep8 - repo: https://github.com/hhatto/autopep8
rev: v2.3.2 rev: v2.3.2
hooks: hooks:
- id: autopep8 - id: autopep8
- repo: https://github.com/asottile/pyupgrade
rev: v3.20.0
hooks:
- id: pyupgrade
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.12.5
hooks:
# Run the linter.
- id: ruff-check
args: [--fix]
# Run the formatter.
- id: ruff-format