You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Badly formatted output when running post-write hooks #1261
Describe the bug
There is a small output bug when running alembic revision ... with a post-write hook. The name of the hook is not correctly displayed:
$ alembic revision -m 'my new revision'
Generating myrepo/migrations/versions/202306151538_my_new_revision.py_ ... done
Running post write hook {name!r} ... # Display bug HERE
reformatted myrepo/migrations/versions/202306151538_my_new_revision.py
All done! ✨ 🍰 ✨
1 file reformatted.
done
Happy to fix, if approved!
Expected behavior
This output
$ alembic revision -m 'my new revision'
Generating myrepo/migrations/versions/202306151538_my_new_revision.py_ ... done
Running post write hook black ... # Display bug HERE
reformatted myrepo/migrations/versions/202306151538_my_new_revision.py
All done! ✨ 🍰 ✨
1 file reformatted.
done
Activity
CaselIT commentedon Jun 15, 2023
Hi,
duh. thanks for noticing. strange that no linted said anything about it.
Care to create a PR for it?
duc00 commentedon Jun 17, 2023
Sure!
sqla-tester commentedon Jun 17, 2023
Mathieu Défosse has proposed a fix for this issue in the main branch:
Fixed CLI output when running post_write hooks https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4731
Fixed CLI output when running post_write hooks