-
Notifications
You must be signed in to change notification settings - Fork 63
Description
This is a minor detail: if you generate a database migration script with alembic, the current mako template puts single quotes around the revision identifiers whereas the linter wants double quotes.
tiled/tiled/authn_database/migrations/script.py.mako
Lines 12 to 16 in 0388f21
| # revision identifiers, used by Alembic. | |
| revision = ${repr(up_revision)} | |
| down_revision = ${repr(down_revision)} | |
| branch_labels = ${repr(branch_labels)} | |
| depends_on = ${repr(depends_on)} |
My understanding is that the values of these identifies can be different datatypes depending on the context, so making this consistent with the linter while maintaining the correct form requires at least a little thought.
Catalog migrations should have the same issue:
tiled/tiled/catalog/migrations/script.py.mako
Lines 12 to 16 in 0388f21
| # revision identifiers, used by Alembic. | |
| revision = ${repr(up_revision)} | |
| down_revision = ${repr(down_revision)} | |
| branch_labels = ${repr(branch_labels)} | |
| depends_on = ${repr(depends_on)} |
While everyone runs pre-commit before committing (obviously, nobody would ever forget), making generated files agree with the linter in the first place is good QoL.