python-template/.pre-commit-config.yaml
ItsDrike 64ba764447
Some checks are pending
CI / validation (push) Waiting to run
CI / unit-tests (push) Waiting to run
CI / Produce Pull Request payload artifact (push) Waiting to run
Use proper extension for pre-commit config (yaml not yml)
2024-07-13 13:20:07 +02:00

45 lines
1.2 KiB
YAML

---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-toml # For pyproject.toml
- id: check-yaml # For workflows, and this file
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: mixed-line-ending
args: [--fix=lf]
- repo: local
hooks:
- id: ruff
name: ruff
description: Run ruff linter
entry: poetry run ruff check --force-exclude
language: system
types_or: [python, pyi]
require_serial: true
args: [--fix, --exit-non-zero-on-fix]
- repo: local
hooks:
- id: ruff-format
name: ruff-format
description: Run ruff formatter
entry: poetry run ruff format
language: system
types_or: [python, pyi]
require_serial: true
- repo: local
hooks:
- id: basedpyright
name: Based Pyright
description: Run basedpyright type checker
entry: poetry run basedpyright --warnings
language: system
types: [python]
pass_filenames: false # pyright runs for the entire project, it can't run for single files