Skip to content

Conversation

@Flaab123
Copy link
Contributor

The typing of the partial_reordering argument of batch_alter_table is not correct.

Description

As stated in the documentation and docstring, the batch_alter_table() function expects a list of tuples for the partial_reordering argument. The current typing suggests the user to insert a tuple containing Any into the argument, which doesn't align with the docstring.

Checklist

This pull request is:

  • [ x] A documentation / typographical error fix
    • Good to go, no issue or tests are needed
  • 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!

@zzzeek zzzeek requested a review from sqla-tester December 15, 2025 16:45
Copy link
Collaborator

@sqla-tester sqla-tester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, this is sqla-tester setting up my work on behalf of zzzeek to try to get revision afd9a70 of this pull request into gerrit so we can run tests and reviews and stuff

@sqla-tester
Copy link
Collaborator

New Gerrit review created for change afd9a70: https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/6521

Copy link
Member

@zzzeek zzzeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these Any are strings, we can use newer style annotations now also

@Flaab123 Flaab123 requested a review from zzzeek December 16, 2025 09:28
@zzzeek zzzeek requested a review from sqla-tester December 16, 2025 13:27
Copy link
Collaborator

@sqla-tester sqla-tester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, this is sqla-tester setting up my work on behalf of zzzeek to try to get revision f0a0c1a of this pull request into gerrit so we can run tests and reviews and stuff

@sqla-tester
Copy link
Collaborator

Patchset f0a0c1a added to existing Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/6521

@sqla-tester
Copy link
Collaborator

Michael Bayer (zzzeek) wrote:

our tooling does not support the | None thing yet so i had to change it back to Optional[]. thanks for the patch

View this in Gerrit at https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/6521

@sqla-tester
Copy link
Collaborator

Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/6521 has been merged. Congratulations! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants