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

Declare default imports in pydanticgen/pydanticgen.py #2367

Open
Silvanoc opened this issue Oct 11, 2024 · 1 comment
Open

Declare default imports in pydanticgen/pydanticgen.py #2367

Silvanoc opened this issue Oct 11, 2024 · 1 comment

Comments

@Silvanoc
Copy link
Contributor

PR #2329 is reducing some parts of the Pydantic generator to generate the imports. Once that PR gets merged, it would be meaningful to centralize the declaration of default imports and additional import sets.

          can we move the declaration of the default imports out of this method? eg. in pydanticgen it's at the module level: https://github.com/linkml/linkml/blob/c4379e5a121732b6adda21284bb34dde590743b1/linkml/generators/pydanticgen/pydanticgen.py#L70

Originally posted by @sneakers-the-rat in #2329 (comment)

@sneakers-the-rat
Copy link
Collaborator

maybe not centralize, since the pythongen imports are pretty different than the pydanticgen ones, but move from the method definition to the module yes yes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants