c19c69e668
Inspired by Nova's patch [1]. [1]: https://review.opendev.org/c/openstack/nova/+/896987 Change-Id: I7f8d2e820d539949e1724de7b82d685415ee3cd3
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
# See https://pre-commit.com for more information
|
|
# See https://pre-commit.com/hooks.html for more hooks
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: 3298ddab3c13dd77d6ce1fc0baf97691430d84b0 # v4.3.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
# Replaces or checks mixed line ending
|
|
- id: mixed-line-ending
|
|
args: ['--fix', 'lf']
|
|
exclude: '.*\.(svg)$'
|
|
- id: end-of-file-fixer
|
|
# Forbid files which have a UTF-8 byte-order marker
|
|
- id: check-byte-order-marker
|
|
# Checks that non-binary executables have a proper shebang
|
|
- id: check-executables-have-shebangs
|
|
# Check for files that contain merge conflict strings.
|
|
- id: check-merge-conflict
|
|
- id: debug-statements
|
|
- id: check-yaml
|
|
files: .*\.(yaml|yml)$
|
|
- id: check-added-large-files
|
|
- repo: local
|
|
hooks:
|
|
- id: flake8
|
|
name: flake8
|
|
additional_dependencies:
|
|
- hacking>=6.1.0,<6.2.0
|
|
language: python
|
|
entry: flake8
|
|
files: '^.*\.py$'
|
|
exclude: '^(doc|releasenotes|tools)/.*$'
|
|
- repo: https://github.com/asottile/pyupgrade
|
|
rev: v3.13.0
|
|
hooks:
|
|
- id: pyupgrade
|
|
args: [--py38-plus]
|