Skip to content

Commit 7f6d02a

Browse files
committed
chore: enhance pre-commit hooks with unsafe fixes and update line length
- Add --unsafe-fixes flag to ruff check for more aggressive auto-fixing - Update isort line-length from 100 to 120 to match ruff configuration - Keep Option A (industry standard): hooks auto-fix and fail commit so developer can review changes before re-committing This ensures consistent formatting across the codebase while maintaining visibility into what changes were made by the formatters.
1 parent 91830aa commit 7f6d02a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ repos:
1414
rev: v0.1.15
1515
hooks:
1616
- id: ruff
17-
args: [--fix]
17+
args: [--fix, --unsafe-fixes]
1818
- id: ruff-format
1919

2020
- repo: https://github.com/pycqa/isort
2121
rev: 5.13.2
2222
hooks:
2323
- id: isort
24-
args: [--profile=black, --line-length=100]
24+
args: [--profile=black, --line-length=120]
2525

2626
- repo: https://github.com/pre-commit/mirrors-mypy
2727
rev: v1.8.0

0 commit comments

Comments
 (0)