-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pre-commit - Update configuration and job versions (#4201)
* Update pre-commit config - Update versions of pre-commit jobs - Use flake8 from PyCQA * Changes made by pyupgrade * Changes made by black * Use files and type rather than a regexp for dashboard validation
- Loading branch information
Showing
7 changed files
with
75 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,54 @@ | ||
default_language_version: | ||
python: python3 | ||
|
||
repos: | ||
- repo: https://github.com/asottile/reorder_python_imports | ||
rev: v1.6.0 | ||
hooks: | ||
- id: reorder-python-imports | ||
args: [--py3-plus, --application-directories, "koku"] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.31.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py36-plus] | ||
- repo: https://github.com/ambv/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
args: [--line-length, "119"] | ||
require_serial: true | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.2.3 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
exclude: ".unleash/" | ||
- id: debug-statements | ||
- id: flake8 | ||
- repo: https://github.com/haizaar/check-pipfile-lock | ||
rev: v0.0.3 | ||
hooks: | ||
- id: check-pipfile-lock | ||
- repo: local | ||
hooks: | ||
- id: validate-dashboards | ||
name: Validate Grafana Dashboards | ||
description: Ensures dashboard files are valid JSON | ||
entry: dev/scripts/validate_dashboards.py | ||
language: python | ||
pass_filenames: false | ||
files: dashboards/.*\.yaml | ||
additional_dependencies: | ||
- pyyaml | ||
- repo: https://github.com/asottile/reorder_python_imports | ||
rev: v3.9.0 | ||
hooks: | ||
- id: reorder-python-imports | ||
args: [--py3-plus, --application-directories, "koku"] | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.3.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py36-plus] | ||
|
||
- repo: https://github.com/ambv/black | ||
rev: 22.12.0 | ||
hooks: | ||
- id: black | ||
args: [--line-length, "119"] | ||
require_serial: true | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: debug-statements | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
exclude: ".unleash/" | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
|
||
- repo: https://github.com/haizaar/check-pipfile-lock | ||
rev: v0.0.5 | ||
hooks: | ||
- id: check-pipfile-lock | ||
|
||
- repo: local | ||
hooks: | ||
- id: validate-dashboards | ||
name: Validate Grafana Dashboards | ||
description: Ensures dashboard files are valid JSON | ||
entry: dev/scripts/validate_dashboards.py | ||
language: python | ||
# pass_filenames: true | ||
files: dashboards/ | ||
types: | ||
- yaml | ||
additional_dependencies: | ||
- pyyaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters