get_parent_argument

app.util.helpers.generics.get_parent_argument(cls: type | GenericAlias, parent: type | Iterable[type], param: ParamType, **kwargs: Unpack[GetParentArgumentKwargs]) ArgType[source]

Return the value or bound resolved for param on parent within cls.

If parent is an iterable of types, check each in order until one is found that specialises param.

Raises:

GenericsError – If param cannot be resolved or violates the optional bound constraint.

Parameters:
Return type:

ArgType