Skip to content

Instantly share code, notes, and snippets.

@ikegami-yukino
Created December 27, 2024 15:50
Show Gist options
  • Save ikegami-yukino/fe026f571b2ddda633da4ad7e8d49642 to your computer and use it in GitHub Desktop.
Save ikegami-yukino/fe026f571b2ddda633da4ad7e8d49642 to your computer and use it in GitHub Desktop.
Git pre-commit for ruff
files: ^backend/.*$
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.7
hooks:
# Run the linter.
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix]
# Run the formatter.
- id: ruff-format
types_or: [python, pyi, jupyter]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment