Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit GenericModel docstring from generated types #10

Open
phillipdupuis opened this issue May 19, 2021 · 0 comments
Open

Omit GenericModel docstring from generated types #10

phillipdupuis opened this issue May 19, 2021 · 0 comments
Assignees

Comments

@phillipdupuis
Copy link
Owner

With new installations, it seems that if you convert a generic model the resulting .ts definitions have this docstring above all models subclassing pydantic's GenericModel:

/**
 * Abstract base class for generic types.
 *
 * A generic type is typically declared by inheriting from
 * this class parameterized with one or more type variables.
 * For example, a generic mapping type might be defined as::
 *
 *   class Mapping(Generic[KT, VT]):
 *       def __getitem__(self, key: KT) -> VT:
 *           ...
 *       # Etc.
 *
 * This class can then be used as follows::
 *
 *   def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
 *       try:
 *           return mapping[key]
 *       except KeyError:
 *           return default
 */

(and it's obviously useless, so it should be removed by default)

@phillipdupuis phillipdupuis self-assigned this May 19, 2021
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

No branches or pull requests

1 participant