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

Mypy errors when generating migration #80

Open
4c0n opened this issue Jul 31, 2024 · 0 comments · May be fixed by #81
Open

Mypy errors when generating migration #80

4c0n opened this issue Jul 31, 2024 · 0 comments · May be fixed by #81
Assignees
Labels
bug Something isn't working not critical

Comments

@4c0n
Copy link

4c0n commented Jul 31, 2024

Generating the migration goes well and executing works like a charm, however mypy has a few complaints:

migrations/versions/cd7033b17112_update_form_component_types_enum.py:13: error: Module "alembic_postgresql_enum" does not explicitly export attribute "TableReference"  [attr-defined]
migrations/versions/cd7033b17112_update_form_component_types_enum.py:26: error: Module has no attribute "sync_enum_values"  [attr-defined]
migrations/versions/cd7033b17112_update_form_component_types_enum.py:44: error: Module has no attribute "sync_enum_values"  [attr-defined]

I'm running mypy in strict mode btw. I suppose the first one could be fixed easily by either defining __all__ in the __init__.py or by using:

from .get_enum_data import ColumnType as ColumnType
from .get_enum_data import TableReference as TableReference

instead of:

from .get_enum_data import ColumnType, TableReference

Not sure how to go about fixing the others though.

@AlexandrovRoman AlexandrovRoman self-assigned this Aug 1, 2024
@AlexandrovRoman AlexandrovRoman added bug Something isn't working not critical labels Aug 1, 2024
@AlexandrovRoman AlexandrovRoman linked a pull request Aug 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working not critical
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants