Skip to content

Instantly share code, notes, and snippets.

@faruqsandi
Created April 28, 2025 03:12
Show Gist options
  • Save faruqsandi/0c7bde5107032577e867a17222767e5c to your computer and use it in GitHub Desktop.
Save faruqsandi/0c7bde5107032577e867a17222767e5c to your computer and use it in GitHub Desktop.
My pre-commit config for Python
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 # Use the latest version
hooks:
- id: end-of-file-fixer
# - id: forbid-tabs
# Run ruff linter with fix before formatter as recommended by ruff docs
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.7 # Use the latest version
hooks:
- id: ruff
args: [--fix] # Automatically fix linting issues
- id: ruff-format # Run formatter after linter with fix
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1 # Use the latest version
hooks:
- id: codespell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment