Release/v0.6.0 #12

Merged
rus07tam merged 13 commits from release/v0.6.0 into main 2025-11-26 17:17:42 +03:00
3 changed files with 10 additions and 14 deletions
Showing only changes of commit 3d132251fc - Show all commits

View file

@ -1,10 +1,9 @@
from .attrs import get_attrs, get_or_set_attr
from .calls import call, caller
from .funcs import call, caller, side, side_func
from .exceptions import catch, throw
from .frames import frame
from .gil import GIL_ENABLED, nolock
from .inherit import inherit
from .side import side, side_func
from .this import this
from .to_async import to_async

View file

@ -1,4 +1,4 @@
from typing import Callable, ParamSpec, TypeVar
from typing import Any, Callable, ParamSpec, TypeVar
P = ParamSpec("P")
T = TypeVar("T")
@ -10,3 +10,11 @@ def call(f: Callable[P, T], *args: P.args, **kwargs: P.kwargs) -> T:
def caller(f: Callable[P, T], *args: P.args, **kwargs: P.kwargs) -> Callable[..., T]:
return lambda *_, **__: f(*args, **kwargs)
def side(value: T, *_: Any, **__: Any) -> T:
return value
def side_func(value: T, *_: Any, **__: Any) -> Callable[..., T]:
return lambda *_, **__: value

View file

@ -1,11 +0,0 @@
from typing import Any, Callable, TypeVar
T = TypeVar("T")
def side(value: T, *_: Any, **__: Any) -> T:
return value
def side_func(value: T, *_: Any, **__: Any) -> Callable[..., T]:
return lambda *_, **__: value