From f7d0909deb8d0cf06607c4d51090ca23f7d92664 Mon Sep 17 00:00:00 2001 From: Corey Oordt Date: Wed, 7 Aug 2024 13:38:20 -0500 Subject: [PATCH] Fixes mypy pre-commit checking. --- .pre-commit-config.yaml | 4 ++++ bumpversion/aliases.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d21900d6..b1a3e328 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -55,6 +55,10 @@ repos: - id: mypy args: [--no-strict-optional, --ignore-missing-imports] additional_dependencies: ["pydantic>2.0", "toml"] + exclude: | + (?x)^( + test.* + )$ - repo: https://github.com/jsh9/pydoclint rev: 0.5.6 hooks: diff --git a/bumpversion/aliases.py b/bumpversion/aliases.py index 3a630af9..22123d80 100644 --- a/bumpversion/aliases.py +++ b/bumpversion/aliases.py @@ -16,7 +16,7 @@ class AliasedGroup(RichGroup): If there were a command called ``push``, it would accept ``pus`` as an alias (so long as it was unique) """ - def get_command(self, ctx: Context, cmd_name: str) -> Optional[click.Command]: + def get_command(self, ctx: Context, cmd_name: str) -> Optional[click.Command]: # type: ignore[return] """Given a context and a command name, this returns a Command object if it exists or returns None.""" rv = click.Group.get_command(self, ctx, cmd_name) if rv is not None: