2021-03-11 16:20:15 +00:00
|
|
|
---
|
|
|
|
|
default_language_version:
|
|
|
|
|
# force all unspecified python hooks to run python3
|
|
|
|
|
python: python3
|
|
|
|
|
repos:
|
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2024-04-23 12:22:26 +01:00
|
|
|
rev: v4.6.0
|
2021-03-11 16:20:15 +00:00
|
|
|
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)$
|
2022-07-04 12:14:56 +01:00
|
|
|
args: ['--unsafe']
|
2024-04-23 12:23:13 +01:00
|
|
|
- repo: https://github.com/asottile/pyupgrade
|
|
|
|
|
rev: v3.15.2
|
|
|
|
|
hooks:
|
|
|
|
|
- id: pyupgrade
|
|
|
|
|
args: ['--py38-plus']
|
2023-05-08 11:41:29 +01:00
|
|
|
- repo: https://github.com/psf/black
|
2024-04-23 12:22:26 +01:00
|
|
|
rev: 24.4.0
|
2023-05-08 11:41:29 +01:00
|
|
|
hooks:
|
|
|
|
|
- id: black
|
|
|
|
|
args: ['-S', '-l', '79']
|
2023-05-08 11:12:16 +01:00
|
|
|
- repo: https://github.com/PyCQA/bandit
|
2024-04-23 12:22:26 +01:00
|
|
|
rev: 1.7.8
|
2023-05-08 11:12:16 +01:00
|
|
|
hooks:
|
|
|
|
|
- id: bandit
|
2024-04-26 12:51:18 +01:00
|
|
|
args: ['-x', 'tests']
|
2024-01-23 11:47:52 +00:00
|
|
|
- repo: https://opendev.org/openstack/hacking
|
|
|
|
|
rev: 6.1.0
|
2021-03-11 16:20:15 +00:00
|
|
|
hooks:
|
2024-01-23 11:47:52 +00:00
|
|
|
- id: hacking
|
|
|
|
|
additional_dependencies: []
|
2021-03-11 16:20:15 +00:00
|
|
|
exclude: '^(doc|releasenotes|tools)/.*$'
|