intro-to-python/.pre-commit-config.yaml

29 lines
810 B
YAML
Raw Permalink Normal View History

default_stages: [commit]
fail_fast: true
repos:
- repo: local
hooks:
- id: doctests
name: Run the xdoctests in the source files
entry: poetry run nox -s doctests --
language: system
stages: [commit, merge-commit]
types: [python]
- id: fix-branch-references
name: Check for wrong branch references
entry: poetry run nox -s fix-branch-references --
language: system
stages: [commit, merge-commit]
types: [text]
# Enable hooks provided by the pre-commit project to
# enforce rules that local tools could not that easily.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-added-large-files
args: [--maxkb=250]
- id: check-merge-conflict
- id: no-commit-to-branch
args: [--branch, main]
- id: trailing-whitespace