Merge "pre-commit: Bump version"

This commit is contained in:
Zuul 2024-12-16 14:22:13 +00:00 committed by Gerrit Code Review
commit da144ae968
4 changed files with 13 additions and 35 deletions

View File

@ -1,15 +1,6 @@
# We from the Oslo project decided to pin repos based on the
# commit hash instead of the version tag to prevend arbitrary
# code from running in developer's machines. To update to a
# newer version, run `pre-commit autoupdate` and then replace
# the newer versions with their commit hash.
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 9136088a246768144165fcc3ecc3d31bb686920a # v3.3.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
# Replaces or checks mixed line ending
@ -27,13 +18,12 @@ repos:
- id: debug-statements
- id: check-yaml
files: .*\.(yaml|yml)$
- repo: local
- repo: https://opendev.org/openstack/hacking
rev: 7.0.0
hooks:
- id: flake8
name: flake8
additional_dependencies:
- hacking>=3.0.1,<3.1.0
language: python
entry: flake8
files: '^.*\.py$'
exclude: '^(doc|releasenotes|tools)/.*$'
- id: hacking
additional_dependencies: []
- repo: https://github.com/PyCQA/bandit
rev: 1.7.10
hooks:
- id: bandit

View File

@ -135,6 +135,6 @@ texinfo_documents = [
apidoc_output_dir = 'contributor/modules'
apidoc_module_dir = '../../osprofiler'
apidoc_excluded_paths = [
'hacking',
'tests',
'hacking',
'tests',
]

View File

@ -1,15 +1,9 @@
hacking>=7.0.0,<8.0.0 # Apache-2.0
flake8-import-order==0.18.2 # LGPLv3
coverage>=4.0 # Apache-2.0
ddt>=1.0.1 # MIT
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT
docutils>=0.14 # OSI-Approved Open Source, Public Domain
# Bandit security code scanner
bandit>=1.7.0,<1.8.0 # Apache-2.0
pymongo!=3.1,>=3.0.2 # Apache-2.0
# Elasticsearch python client
@ -22,5 +16,3 @@ redis>=2.10.0 # MIT
jaeger-client>=3.8.0 # Apache-2.0
opentelemetry-exporter-otlp>=1.16.0 # Apache-2.0
opentelemetry-sdk>=1.16.0 # Apache-2.0
pre-commit>=2.6.0 # MIT

View File

@ -26,11 +26,10 @@ deps =
oslo.messaging
[testenv:pep8]
deps =
pre-commit
commands =
pre-commit run -a
# Run security linter
bandit -r osprofiler -n5
distribute = false
[testenv:venv]
commands = {posargs}
@ -55,9 +54,6 @@ commands =
sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html
usedevelop = false
[testenv:bandit]
commands = bandit -r osprofiler -n5
[flake8]
show-source = true
builtins = _