]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
refactor: add revision context to AutogenerateDiffsDetected so that wrappers may...
authorLouis-Amaury Chaib <louisamaury.chaib@partoo.fr>
Sat, 1 Feb 2025 09:02:34 +0000 (04:02 -0500)
committersqla-tester <sqla-tester@sqlalchemy.org>
Sat, 1 Feb 2025 09:02:34 +0000 (04:02 -0500)
commit3d33cfab046dfd7ca8df43c0afd3c6d738fcdc7e
tree5effe6a81561b1a5a9f85ee173f1eec7a8c6c28d
parent980bd91afbaa5fa60c3aa2c7661114f1bfa4a100
refactor: add revision context to AutogenerateDiffsDetected so that wrappers may make other formatting of the diff

### Description
As discussed in #1597, AutogenerateDiffsDetected should hold contextual information so that command can be wrapped for another format (CI, pre-commit hook...)

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #1598
Pull-request: https://github.com/sqlalchemy/alembic/pull/1598
Pull-request-sha: 7799320ad3c1a1bd769254d610288c97f85cb345

Change-Id: Id08bc52a0586063f177736a36a61f96232459f1c
alembic/command.py
alembic/util/exc.py
docs/build/unreleased/issue1597.rst [new file with mode: 0644]