Skip to content

Commit

Permalink
Update pre-commit packages and fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong committed Oct 7, 2023
1 parent 5848cc8 commit f5b6aed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
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

0 comments on commit f5b6aed

Please sign in to comment.