diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc209f4..ba087ba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,7 +27,7 @@ repos: types: [text] exclude: ^(.pre-commit-config.yaml|.github/workflows/test.yml)$ - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + rev: 6.1.0 hooks: - id: flake8 args: [-j8] @@ -40,7 +40,7 @@ repos: - flake8-pyproject - flake8-string-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.4.1 + rev: v1.5.1 hooks: - id: mypy additional_dependencies: [types-setuptools] diff --git a/shtab/__init__.py b/shtab/__init__.py index 5f38b88..99220e7 100644 --- a/shtab/__init__.py +++ b/shtab/__init__.py @@ -798,7 +798,8 @@ def complete(parser: ArgumentParser, shell: str = "bash", root_prefix: Opt[str] ) -def completion_action(parent: Opt[ArgumentParser] = None, preamble: Union[str, Dict[str, str]] = ""): +def completion_action(parent: Opt[ArgumentParser] = None, preamble: Union[str, Dict[str, + str]] = ""): class PrintCompletionAction(_ShtabPrintCompletionAction): def __call__(self, parser, namespace, values, option_string=None): print(complete(parent or parser, values, preamble=preamble))