register_type

app.util.helpers.generics.register_type(cls: type, *, name: str | None = None) None[source]

Add a named class to the generics types namespace.

This namespace is used to resolve ForwardRef arguments during generic introspection.

Parameters:
  • cls (type) – The class to register.

  • name (str | None) – The name to use for the class in the ForwardRef namespace. If None, the class’s __name__ is used.

Return type:

None