diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 11be5143a..20d75b8be 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: hooks: - id: actionlint - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.3.0 + rev: v1.3.1 hooks: - id: zizmor - repo: https://github.com/shellcheck-py/shellcheck-py @@ -33,7 +33,7 @@ repos: hooks: - id: pyproject-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.4 + rev: v0.9.6 hooks: - id: ruff args: ["--exit-non-zero-on-fix"] diff --git a/returns/interfaces/specific/future_result.py b/returns/interfaces/specific/future_result.py index 3a65ccb6d..bfbc915ed 100644 --- a/returns/interfaces/specific/future_result.py +++ b/returns/interfaces/specific/future_result.py @@ -12,7 +12,7 @@ from collections.abc import Awaitable, Callable from typing import TYPE_CHECKING, TypeVar -from typing_extensions import Never +from typing_extensions import Never, Self from returns.interfaces.specific import future, ioresult from returns.primitives.hkt import KindN @@ -77,9 +77,9 @@ def from_failed_future( @classmethod def from_future_result( - cls: type[_FutureResultLikeType], + cls, inner_value: FutureResult[_ValueType, _ErrorType], - ) -> KindN[_FutureResultLikeType, _ValueType, _ErrorType, _ThirdType]: + ) -> KindN[Self, _ValueType, _ErrorType, _ThirdType]: """Creates container from ``FutureResult`` instance.""" diff --git a/typesafety/test_curry/test_curry/test_curry_generics.yml b/typesafety/test_curry/test_curry/test_curry_generics.yml index fe3e6556f..ee738120d 100644 --- a/typesafety/test_curry/test_curry/test_curry_generics.yml +++ b/typesafety/test_curry/test_curry/test_curry_generics.yml @@ -49,11 +49,12 @@ ... x: List[int] + y: List[str] - reveal_type(zero) # N: Revealed type is "Overload(def (arg: builtins.int) -> def [T] (other: builtins.list[T`-1]) -> T`-1, def [T] (arg: builtins.int, other: builtins.list[T`-1]) -> T`-1)" - reveal_type(zero(1)) # N: Revealed type is "def [T] (other: builtins.list[T`2]) -> T`2" reveal_type(zero(1)(x)) # N: Revealed type is "builtins.int" reveal_type(zero(1, x)) # N: Revealed type is "builtins.int" + reveal_type(zero(1)(y)) # N: Revealed type is "builtins.str" + reveal_type(zero(1, y)) # N: Revealed type is "builtins.str" # TODO: enable and fix our plugin