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

Use relative imports in generated Python packages #1110

Open
twosigmajab opened this issue Sep 25, 2018 · 3 comments
Open

Use relative imports in generated Python packages #1110

twosigmajab opened this issue Sep 25, 2018 · 3 comments

Comments

@twosigmajab
Copy link

Please see swagger-api/swagger-codegen#8738

@twosigmajab
Copy link
Author

I think the fix for this issue is small and simple. Is there interest in fixing it?

@wing328
Copy link
Member

wing328 commented Oct 23, 2018

Please file a PR so that we can review the fix more easily.

@twosigmajab
Copy link
Author

Not sure if/when I'll have a chance to do this. If someone wants to beat me to it, here is an example from when Connexion (the library you're using for Python server support) made this same improvement over 3 years ago:
spec-first/connexion@b77a5c7

So for example, instead of doing from {{packageName}} import util in places like this, you'd do something like from .util import ....

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