ArgumentInfo

class app.util.helpers.generics.ArgumentInfo[source]

Bases: NamedTuple

Metadata describing the argument bound to a ParameterInfo.

Inheritance diagram of ArgumentInfo

Inheritance Diagram for ArgumentInfo

Methods

Attributes

bound

Return the evaluated bound for the underlying TypeVar argument.

is_concrete

Return True if the argument is a concrete type rather than a TypeVar.

name

Return a display-friendly name for the currently bound value.

owner

Return the originating class or alias where the parameter was declared.

owner_origin

Return the typing origin for the originating class or alias.

parameter

The parameter definition associated with this bound argument.

raw_value

The raw argument currently bound to the parameter.

value

Return the evaluated value currently bound to the parameter.

value_or_bound

Return the concrete value if available, otherwise fall back to the bound.

static __new__(_cls, parameter: ParameterInfo, raw_value: ArgType)

Create new instance of ArgumentInfo(parameter, raw_value)

Parameters:
property bound: BoundType

Return the evaluated bound for the underlying TypeVar argument.

property is_concrete: bool

Return True if the argument is a concrete type rather than a TypeVar.

property name: str

Return a display-friendly name for the currently bound value.

property owner: type | GenericAlias

Return the originating class or alias where the parameter was declared.

property owner_origin: type

Return the typing origin for the originating class or alias.

parameter: ParameterInfo

The parameter definition associated with this bound argument.

raw_value: ArgType

The raw argument currently bound to the parameter.

property value: ArgType

Return the evaluated value currently bound to the parameter.

property value_or_bound: ArgType | BoundType

Return the concrete value if available, otherwise fall back to the bound.