From 43e01af38640705ea9f5644f8e415eafe6ca3e28 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 22:09:00 +0000 Subject: [PATCH 1/4] build(deps-dev): bump `mypy` from 1.16.1 to 1.17.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e5629a06e..63da8809f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,7 +84,7 @@ dev = [ "ruff == 0.6.1" ] mypy = [ - "mypy == 1.16.1", + "mypy == 1.17.0", "types-Deprecated ~= 1.2", "types-requests ~= 2.32.0", "types-pyyaml ~= 6.0", From d401d547d84ff9b29f7153c3434a16a903238f6a Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 27 Jul 2025 00:32:02 -0600 Subject: [PATCH 2/4] chore(pre-commit): bump `mypy` plugin from 1.16.1 to 1.17.0 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5ae875b90..0127d653a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -50,7 +50,7 @@ repos: name: ruff (format) - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v1.16.1" + rev: "v1.17.0" hooks: - id: mypy additional_dependencies: From 874b1e5aa544fb155ce41aef1d2db80a4f1ac56e Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 27 Jul 2025 12:46:38 -0600 Subject: [PATCH 3/4] refactor: update type definitions --- src/semantic_release/commit_parser/_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/semantic_release/commit_parser/_base.py b/src/semantic_release/commit_parser/_base.py index a144e0945..aee4f107e 100644 --- a/src/semantic_release/commit_parser/_base.py +++ b/src/semantic_release/commit_parser/_base.py @@ -1,7 +1,7 @@ from __future__ import annotations from abc import ABC, abstractmethod -from typing import TYPE_CHECKING, Any, Generic, TypeVar +from typing import TYPE_CHECKING, Any, Dict, Generic, TypeVar, Union from semantic_release.commit_parser.token import ParseResultType @@ -9,7 +9,7 @@ from git.objects.commit import Commit -class ParserOptions(dict): +class ParserOptions(Dict[Union[str, int, float], Any]): """ ParserOptions should accept the keyword arguments they are interested in from configuration and process them as desired, ultimately creating attributes From 6895ca79fcd3f3922d8cb88a1b2ef471e5b70540 Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Tue, 5 Aug 2025 00:20:19 -0600 Subject: [PATCH 4/4] style(utils): fix mypy errors & unnecessary imports --- src/semantic_release/helpers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/semantic_release/helpers.py b/src/semantic_release/helpers.py index c50369575..f6bae05ea 100644 --- a/src/semantic_release/helpers.py +++ b/src/semantic_release/helpers.py @@ -8,7 +8,7 @@ from functools import lru_cache, reduce, wraps from pathlib import Path, PurePosixPath from re import IGNORECASE, compile as regexp -from typing import TYPE_CHECKING, Any, Callable, NamedTuple, Sequence, TypeVar +from typing import TYPE_CHECKING, Callable, NamedTuple, TypeVar from urllib.parse import urlsplit from semantic_release.globals import logger @@ -16,7 +16,7 @@ if TYPE_CHECKING: # pragma: no cover from logging import Logger from re import Pattern - from typing import Iterable + from typing import Any, Iterable, Sequence number_pattern = regexp(r"(?P\S*?)(?P\d[\d,]*)\b") @@ -94,7 +94,7 @@ def text_reducer(text: str, filter_pair: tuple[Pattern[str], str]) -> str: def validate_types_in_sequence( - sequence: Sequence, types: type | tuple[type, ...] + sequence: Sequence[Any], types: type | tuple[type, ...] ) -> bool: """Validate that all elements in a sequence are of a specific type""" return all(isinstance(item, types) for item in sequence)