mirror of
https://gitlab.com/tildes/tildes.git
synced 2026-04-17 23:08:32 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user