ArgumentInfo
- class app.util.helpers.generics.ArgumentInfo[source]
Bases:
NamedTuple
Metadata describing the argument bound to a
ParameterInfo
.Inheritance Diagram for ArgumentInfo
Methods
Attributes
Return the evaluated bound for the underlying
TypeVar
argument.Return
True
if the argument is a concrete type rather than aTypeVar
.Return a display-friendly name for the currently bound value.
Return the originating class or alias where the parameter was declared.
Return the typing origin for the originating class or alias.
The parameter definition associated with this bound argument.
The raw argument currently bound to the parameter.
Return the evaluated value currently bound to the parameter.
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:
parameter (ParameterInfo)
raw_value (ArgType)
- property bound: BoundType
Return the evaluated bound for the underlying
TypeVar
argument.
- property owner: type | GenericAlias
Return the originating class or alias where the parameter was declared.
- 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.