Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pre-commit packages and fix issues #1032

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ repos:
- id: isort
# language_version: python3.6
- repo: https://github.com/ambv/black
rev: 22.8.0
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.4.0
hooks:
- id: check-case-conflict
- id: end-of-file-fixer
Expand All @@ -33,7 +33,7 @@ repos:
# - id: check-yaml # doesn't work with CloudFormation templates/intrinsics, should use cfn-lint instead
# language_version: python3.6
- repo: https://github.com/pycqa/flake8
rev: "5.0.4"
rev: "6.1.0"
hooks:
- id: flake8
additional_dependencies:
Expand All @@ -45,13 +45,13 @@ repos:
- flake8-pep3101>=1.2.1
# language_version: python3.6
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-mock-methods
- id: python-no-log-warn
- repo: https://github.com/PyCQA/bandit
rev: 1.7.1
rev: 1.7.5
hooks:
- id: bandit
files: "^src/"
Expand Down
4 changes: 3 additions & 1 deletion src/rpdk/core/hook/init_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ def validate_type_name(value):

class ValidatePluginChoice:
def __init__(self, choices):
self.choices = tuple(filter(lambda l: l in HOOK_PLUGINS, choices))
self.choices = tuple(
filter(lambda hook_plugin: hook_plugin in HOOK_PLUGINS, choices)
)
self.max = len(self.choices)

pretty = "\n".join(
Expand Down