Pygentic-AI/.pre-commit-config.yaml

68 lines
1.7 KiB
YAML

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: ['--maxkb=5000']
- id: check-ast
- id: check-builtin-literals
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
# - id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
exclude: tests/
- id: destroyed-symlinks
# - id: detect-aws-credentials
- id: detect-private-key
- id: end-of-file-fixer
exclude: tests/test_changes/
files: \.(py|sh|rst|yml|yaml)$
- id: pretty-format-json
args: [--autofix]
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/aufdenpunkt/pre-commit-js-beautify
rev: 1.13.0 # represents the used version of JS Beautify as well
hooks:
- id: js-beautify
args: ['--html', '--wrap-attributes=force-aligned', '--wrap-line-length=80', "--templating=django"]
files: \.(html|jinja)$
- hooks:
- id: pyupgrade
repo: 'https://github.com/asottile/pyupgrade'
rev: v3.19.1
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: "v0.9.2"
hooks:
- id: ruff
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
exclude: tests/
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py313-plus]