Skip to content

generic

Type Aliases:

Attributes:

FuncExcept module-attribute

FuncExcept = str | Callable[..., Any] | tuple[Callable[..., Any] | str, str]

This type is used in specific functions that can throw an exception.

def can_throw(..., *, func: FuncExcept) -> None:
    ...
    if some_error:
        raise CustomValueError('Some error occurred!!', func)

def some_func() -> None:
    ...
    can_throw(..., func=some_func)
If an error occurs, this will print a clear error ->

ValueError: (some_func) Some error occurred!!

FuncExceptT module-attribute

FuncExceptT = FuncExcept

MISSING module-attribute

MISSING = MISSING

StrArr module-attribute

StrArrOpt module-attribute

DataType

DataType = str | bytes | bytearray | SupportsString

MissingT

MissingT = Literal[MISSING]

PassthroughC

PassthroughC = Callable[[F], F]