Skip to content

Broken import statement when enums are present #146

@chrismatix

Description

@chrismatix

Our schema includes enums which causes the plugin to add the following line to models.py:

import from api.db_gen import enums

This - of course - is not valid Python and causes a crash. I would be great to have the option to completely disable enums until the feature is implemented.

Root cause
It seems that we add the full import statement rather than the module in this line causing the import formatter to treat "from ..." as if it was an importable module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions