Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Baukebrenninkmeijer/9ae66bd4c2bb296c5e1c4aba9a6c3b3c to your computer and use it in GitHub Desktop.
Save Baukebrenninkmeijer/9ae66bd4c2bb296c5e1c4aba9a6c3b3c to your computer and use it in GitHub Desktop.
pre-commit
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0 # Use the latest stable release
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-added-large-files
- id: detect-private-key
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
hooks:
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1 # Use the latest stable release of isort
hooks:
- id: isort
args: ["--profile", "black"]
- repo: local
hooks:
- id: run-tests
name: Run Tests
entry: pytest
language: system
pass_filenames: false
always_run: true
stages: [push]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment