]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
Add "module" post-write hook
authorFrazer McLean <frazer@frazermclean.co.uk>
Thu, 26 Jun 2025 18:47:46 +0000 (20:47 +0200)
committerFrazer McLean <frazer@frazermclean.co.uk>
Mon, 30 Jun 2025 19:50:36 +0000 (21:50 +0200)
commit7a2fb4d1ebc825b94c10147e717cebdb74a46980
treedf6543505402ea9ace88091eb2c54bd879a0bda7
parent0505047601a53060144161d79249d1451b9f4e2b
Add "module" post-write hook

This hook type is almost identical to the console_scripts hook, except
it's running `python -m black` instead of using black's console_script.

It is mainly useful for tools without console scripts (e.g. ruff), but
has semantics closer to the console_scripts hook in that it finds the
ruff module available to the running interpreter instead of finding
an executable by path.

Fixes #1686
alembic/script/write_hooks.py
docs/build/autogenerate.rst
tests/test_post_write.py