snakia.utils
Functions
|
Get the current frame. |
|
Create a new class that inherits from the given class. |
|
|
|
Get the current function. |
|
Throw an exception. |
|
Convert a sync function to an async function. |
- snakia.utils.inherit(type_, attrs=None, /, **kwargs)[source]
Create a new class that inherits from the given class.
- Return type:
TypeVar(T, bound=type)
- snakia.utils.throw(*exceptions, from_=<class 'snakia.types.unique.Unset'>)[source]
Throw an exception.
- Return type:
NoReturn
- snakia.utils.to_async(func)[source]
Convert a sync function to an async function.
- Return type:
Callable[[ParamSpec(P)],Awaitable[TypeVar(R)]]
Modules