get_concrete_parent_argument

app.util.helpers.generics.get_concrete_parent_argument(cls: type | GenericAlias, parent: type | Iterable[type], param: ParamType, **kwargs: Unpack[GetConcreteParentArgumentKwargs]) ConcreteArgType[source]

Return the concrete argument resolved for param from 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 to a concrete type.

Parameters:
Return type:

ConcreteArgType