chore: consolidate redundant pre-commit hooks into ruff #19
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The current
.pre-commit-config.yamlcontains several hooks that can be replaced or consolidated byruff, which is already used in the project. Consolidating these hooks reduces overhead and simplifies maintenance.Redundant hooks that Ruff can handle:
check-ast: Ruff parses the AST and will fail on syntax errors.check-docstring-first: Ruff'sDrules (e.g.,D301) can handle docstring placement.trailing-whitespace: Ruff can handle this viaW291andW293.end-of-file-fixer: Ruff can handle this viaW292.Recommendation:
Evaluate expanding
tool.ruff.lint.selectto include these rules and subsequently removing the corresponding hooks frompre-commit-hooks.