Browse Source

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.
merge-requests/85/head
Deimos 5 years ago
parent
commit
9b27961d48
  1. 5
      tildes/alembic.ini

5
tildes/alembic.ini

@ -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

Loading…
Cancel
Save