Add a hook to format Alembic revisions with Black

Alembic 1.2.0 adds the ability to post-process revision scripts, so this
uses that capability to automatically run any new files through Black.
This always had to be done manually before, so it's nice to have it
taken care of automatically like this.
This commit is contained in:
Deimos
2019-09-21 14:02:07 -06:00
parent 4474fcc055
commit 9b27961d48

View File

@@ -2,6 +2,11 @@
script_location = alembic
sqlalchemy.url = postgresql+psycopg2://tildes:@/tildes
[post_write_hooks]
hooks=black
black.type=console_scripts
black.entrypoint=black
# Logging configuration
[loggers]
keys = root,sqlalchemy,alembic