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: diff --git a/pyproject.toml b/pyproject.toml index 22d33246e..042d063db 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", 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 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) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy