nova/.pre-commit-config.yaml
Stephen Finucane 957141a2ca pre-commit: Bump versions
Also remove the default Python version stanza since everything runs
Python 3 now.

Change-Id: If43485ce684a90b11f64790b1cb7b98f27290157
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-10-18 17:43:39 +01:00

82 lines
2.5 KiB
YAML

---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.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
# nova/cmd/manage.py imports pdb on purpose.
exclude: 'nova/cmd/manage.py'
- id: check-json
files: .*\.json$
- id: check-yaml
files: .*\.(yaml|yml)$
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: remove-tabs
exclude: '.*\.(svg)$'
- repo: https://opendev.org/openstack/hacking
rev: 7.0.0
hooks:
- id: hacking
additional_dependencies: []
exclude: '^(doc|releasenotes|tools)/.*$'
- repo: https://github.com/hhatto/autopep8
rev: v2.3.1
hooks:
- id: autopep8
files: '^.*\.py$'
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: ['--ignore-words=doc/dictionary.txt']
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.12.0
hooks:
- id: mypy
additional_dependencies:
- types-paramiko
# keep this in-sync with '[mypy] files' in 'setup.cfg'
files: |
(?x)(
nova/compute/manager.py
| nova/compute/pci_placement_translator.py
| nova/crypto.py
| nova/filesystem.py
| nova/limit/local.py
| nova/limit/placement.py
| nova/network/neutron.py
| nova/pci
| nova/privsep/path.py
| nova/scheduler/client/report.py
| nova/scheduler/request_filter.py
| nova/scheduler/utils.py
| nova/virt/driver.py
| nova/virt/hardware.py
| nova/virt/libvirt/machine_type_utils.py
| nova/virt/libvirt/__init__.py
| nova/virt/libvirt/cpu/__init__.py
| nova/virt/libvirt/cpu/api.py
| nova/virt/libvirt/cpu/core.py
| nova/virt/libvirt/driver.py
| nova/virt/libvirt/event.py
| nova/virt/libvirt/guest.py
| nova/virt/libvirt/host.py
| nova/virt/libvirt/utils.py
)
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v1.0.0
hooks:
- id: sphinx-lint
args: [--enable=default-role]
files: ^doc/|releasenotes|api-guide
types: [rst]