From 52135fce92c4446e5c9b62078c2d5656adbbcbe4 Mon Sep 17 00:00:00 2001 From: Greg Shepherd Date: Wed, 21 Feb 2024 11:06:41 -0500 Subject: [PATCH 1/2] Update hooks to latest versions and add exclusion for testing recorded file. --- _app_common/.pre-commit-config.yaml | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/_app_common/.pre-commit-config.yaml b/_app_common/.pre-commit-config.yaml index 515ba0b..32e8cef 100644 --- a/_app_common/.pre-commit-config.yaml +++ b/_app_common/.pre-commit-config.yaml @@ -1,7 +1,7 @@ -exclude: ^lib +exclude: ^deps repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.5.0 hooks: - id: check-added-large-files args: ['--maxkb=500'] @@ -17,6 +17,8 @@ repos: - id: check-yaml - id: debug-statements - id: detect-aws-credentials + args: + - '--allow-missing-credentials' - id: detect-private-key - id: double-quote-string-fixer - id: end-of-file-fixer @@ -30,42 +32,32 @@ repos: - id: pretty-format-json args: - --autofix - exclude: ^tests/.+/profiles.d/.* + exclude: '^tests/.+/profiles.d/.*|^tests/.+/staged_requests/.*' - id: requirements-txt-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/bandit - rev: 1.7.4 + rev: 1.7.7 hooks: - id: bandit args: [--exclude, tests] - repo: https://github.com/psf/black - rev: 22.10.0 + rev: 24.2.0 hooks: - id: black - - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 - hooks: - - id: flake8 - repo: https://github.com/pre-commit/mirrors-isort rev: v5.10.1 hooks: - id: isort - repo: https://github.com/pycqa/pydocstyle - rev: 6.1.1 + rev: 6.3.0 hooks: - id: pydocstyle - repo: https://github.com/asottile/pyupgrade - rev: v3.2.2 + rev: v3.15.1 hooks: - id: pyupgrade args: - - --py3-plus - - --py36-plus - - repo: https://github.com/yunojuno/pre-commit-xenon - rev: v0.1 - hooks: - - id: xenon - args: ['--max-average=B', '--exclude=local*', '--ignore=lib_*,local*,target,tests'] + - --py311-plus - repo: local hooks: - id: pylint From 227a979c9a8ad509ac2ff277def104c711dcf76f Mon Sep 17 00:00:00 2001 From: Greg Shepherd Date: Wed, 21 Feb 2024 11:15:49 -0500 Subject: [PATCH 2/2] Update to add back in the hook xenon --- _app_common/.pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/_app_common/.pre-commit-config.yaml b/_app_common/.pre-commit-config.yaml index 32e8cef..fbc6553 100644 --- a/_app_common/.pre-commit-config.yaml +++ b/_app_common/.pre-commit-config.yaml @@ -58,6 +58,11 @@ repos: - id: pyupgrade args: - --py311-plus + - repo: https://github.com/yunojuno/pre-commit-xenon + rev: v0.1 + hooks: + - id: xenon + args: ['--max-average=B', '--exclude=local*', '--ignore=lib_*,local*,target,tests'] - repo: local hooks: - id: pylint