Skip to content

Commit 81f9c9e

Browse files
committed
Add pre-commit configuration file
Introduces .pre-commit-config.yaml to automate code formatting, linting, and basic checks using pre-commit hooks for improved code quality and consistency.
1 parent cc90b4c commit 81f9c9e

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v6.0.0
4+
hooks:
5+
- id: check-docstring-first
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
- repo: https://github.com/asottile/setup-cfg-fmt
9+
rev: v3.2.0
10+
hooks:
11+
- id: setup-cfg-fmt
12+
- repo: https://github.com/astral-sh/ruff-pre-commit
13+
rev: v0.14.10
14+
hooks:
15+
# Run the formatter.
16+
- id: ruff-format
17+
# Run the linter.
18+
- id: ruff-check
19+
args: [--fix,--unsafe-fixes]

0 commit comments

Comments
 (0)