From d4fe6d244ea36b86cf8523d30de24c299496c573 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 23:03:33 +0000 Subject: [PATCH 1/4] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/woodruffw/zizmor-pre-commit: v1.3.0 → v1.3.1](https://github.com/woodruffw/zizmor-pre-commit/compare/v1.3.0...v1.3.1) - [github.com/astral-sh/ruff-pre-commit: v0.9.4 → v0.9.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.4...v0.9.6) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"] From 54a1d72f4ef69bce7b1b27b5db82acc0cf54b4e7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 23:03:43 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks --- returns/interfaces/specific/future_result.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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.""" From f633eae2252c63b2e30e4177942c0a88c483c814 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Tue, 11 Feb 2025 13:21:46 +0300 Subject: [PATCH 3/4] Update test_curry_generics.yml --- typesafety/test_curry/test_curry/test_curry_generics.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typesafety/test_curry/test_curry/test_curry_generics.yml b/typesafety/test_curry/test_curry/test_curry_generics.yml index fe3e6556f..10e481339 100644 --- a/typesafety/test_curry/test_curry/test_curry_generics.yml +++ b/typesafety/test_curry/test_curry/test_curry_generics.yml @@ -37,7 +37,7 @@ - case: curry_two_generic_args2 - disable_cache: false + disable_cache: true main: | from returns.curry import curry from typing import List, TypeVar From 9ba93ecc5e755021e5263108065e1d6ad426b9a6 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Tue, 11 Feb 2025 13:41:17 +0300 Subject: [PATCH 4/4] Update test_curry_generics.yml --- typesafety/test_curry/test_curry/test_curry_generics.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/typesafety/test_curry/test_curry/test_curry_generics.yml b/typesafety/test_curry/test_curry/test_curry_generics.yml index 10e481339..ee738120d 100644 --- a/typesafety/test_curry/test_curry/test_curry_generics.yml +++ b/typesafety/test_curry/test_curry/test_curry_generics.yml @@ -37,7 +37,7 @@ - case: curry_two_generic_args2 - disable_cache: true + disable_cache: false main: | from returns.curry import curry from typing import List, TypeVar @@ -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