Skip to content

Conversation

@blaise-io
Copy link
Member

The parameters in the docs don't match the implementation where the name is the first argument.

def named_model(model_cls: type[T], name: str) -> type[T]:
    """Return a model class with a given name."""
    return type(name, (model_cls,), {})

@youtux youtux merged commit f3c9de1 into master Sep 11, 2024
@youtux youtux deleted the named-model-documentation branch September 11, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants