Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
Expand Down
6 changes: 3 additions & 3 deletions returns/interfaces/specific/future_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."""


Expand Down
5 changes: 3 additions & 2 deletions typesafety/test_curry/test_curry/test_curry_generics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down