Created
July 18, 2024 16:43
-
-
Save leehanchung/f6d3d4606a8f1bb35704d42a0de67ab7 to your computer and use it in GitHub Desktop.
sample python pre-commit configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fail_fast: true | |
default_language_version: | |
python: python3.10 | |
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v4.4.0 | |
hooks: | |
- id: trailing-whitespace | |
- id: end-of-file-fixer | |
- id: check-yaml | |
args: | |
- --unsafe | |
- id: check-added-large-files | |
args: ['--maxkb=50000'] | |
- id: check-xml | |
- id: check-toml | |
- id: check-json | |
- id: check-merge-conflict | |
- id: debug-statements | |
- id: fix-byte-order-marker | |
- repo: https://github.com/abravalheri/validate-pyproject | |
rev: v0.14 | |
hooks: | |
- id: validate-pyproject | |
- repo: https://github.com/charliermarsh/ruff-pre-commit | |
rev: v0.1.5 | |
hooks: | |
- id: ruff | |
args: | |
- --fix | |
- id: ruff-format | |
ci: | |
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks | |
autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment