osc-lib/.pre-commit-config.yaml
Stephen Finucane 8b7723d7da ruff: Enable pyupgrade rules
Change-Id: I644bda658e81adb8caf07d392f8adb4ee88f9f16
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-09-12 17:55:08 +01:00

37 lines
1007 B
YAML

---
default_language_version:
# force all unspecified python hooks to run python3
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: mixed-line-ending
args: ['--fix', 'lf']
exclude: '.*\.(svg)$'
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
- id: check-yaml
files: .*\.(yaml|yml)$
exclude: '^zuul.d/.*$'
- repo: https://github.com/PyCQA/doc8
rev: v1.1.2
hooks:
- id: doc8
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
hooks:
- id: ruff
args: ['--fix', '--unsafe-fixes']
- id: ruff-format
- repo: https://opendev.org/openstack/hacking
rev: 7.0.0
hooks:
- id: hacking
additional_dependencies:
- flake8-import-order~=0.18.2
exclude: '^(doc|releasenotes|tools)/.*$'