openstacksdk/.pre-commit-config.yaml
Stephen Finucane 9325626769 Use pre-commit for 'pep8' tox target, bump versions
We want to bump the versions of hacking, but doing so requires changes
in two places: '.pre-commit-config.yaml' and 'tox.ini'. This is silly:
we can simply use tox to handle pre-commit and leave all other
dependencies to pre-commit. Do this, migrating doc8 to pre-commit and
bumping the other dependencies in the process.

Change-Id: I26fa07145129d3ef9cb17693427ed70e55dbaaf5
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-05-03 12:18:41 +01:00

35 lines
930 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.4.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.1
hooks:
- id: doc8
- repo: local
hooks:
- id: flake8
name: flake8
additional_dependencies:
- hacking>=6.0.1,<6.1.0
- flake8-import-order>=0.18.2,<0.19.0
language: python
entry: flake8
files: '^.*\.py$'
exclude: '^(doc|releasenotes|tools)/.*$'