tiled icon indicating copy to clipboard operation
tiled copied to clipboard

Generated alembic migration script disagrees with linter

Open nmaytan opened this issue 2 months ago • 0 comments

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.

https://github.com/bluesky/tiled/blob/0388f21d3e1f799e635bb0acf0b358dc90e3e9ac/tiled/authn_database/migrations/script.py.mako#L12-L16

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: https://github.com/bluesky/tiled/blob/0388f21d3e1f799e635bb0acf0b358dc90e3e9ac/tiled/catalog/migrations/script.py.mako#L12-L16

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.

nmaytan avatar Nov 14 '25 00:11 nmaytan