diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c51b97c6..7275ede4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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: @@ -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/" diff --git a/src/rpdk/core/hook/init_hook.py b/src/rpdk/core/hook/init_hook.py index 8967d6f7..43b193e5 100644 --- a/src/rpdk/core/hook/init_hook.py +++ b/src/rpdk/core/hook/init_hook.py @@ -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(