Files
oslo.utils/.pre-commit-config.yaml
Stephen Finucane 5faff28d9b Add typing (1/3)
We add it to all the top-level modules. We will tackle imageutils
separately since it's quite large in and of itself.

Change-Id: I26b16a471c19a59cf8b084be01ca7c57dbba530e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2025-09-11 17:57:04 +01:00

49 lines
1.4 KiB
YAML

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
# Replaces or checks mixed line ending
- id: mixed-line-ending
args: ['--fix', 'lf']
exclude: '.*\.(svg)$'
# 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
# Check for debugger imports and py37+ breakpoint()
# calls in python source
- id: debug-statements
- id: check-yaml
files: .*\.(yaml|yml)$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.7
hooks:
- id: ruff-check
args: ['--fix', '--unsafe-fixes']
- id: ruff-format
- repo: https://opendev.org/openstack/hacking
rev: 7.0.0
hooks:
- id: hacking
additional_dependencies: []
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.17.1
hooks:
- id: mypy
additional_dependencies:
- iso8601
- packaging
- pyparsing
- types-PyYAML
- types-greenlet
- types-netaddr
- types-psutil
exclude: |
(?x)(
doc/.*
| releasenotes/.*
)