<!-- Provide a general summary of your proposed changes in the Title field above -->
The typing of the `partial_reordering` argument of `batch_alter_table` is not correct.
<!-- Describe your changes in detail -->
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.
<!-- 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:
- [ 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!**
Closes: #1764
Pull-request: https://github.com/sqlalchemy/alembic/pull/1764
Pull-request-sha:
f0a0c1a913b93a2c71881e69be83a7888e21bc5e
Change-Id: I1f442df0674e85361234a97aed1d79f58d30214f
table_name: str,
schema: Optional[str] = None,
recreate: Literal["auto", "always", "never"] = "auto",
- partial_reordering: Optional[Tuple[Any, ...]] = None,
+ partial_reordering: Optional[list[tuple[str, ...]]] = None,
copy_from: Optional[Table] = None,
table_args: Tuple[Any, ...] = (),
table_kwargs: Mapping[str, Any] = immutabledict({}),
table_name: str,
schema: Optional[str] = None,
recreate: Literal["auto", "always", "never"] = "auto",
- partial_reordering: Optional[Tuple[Any, ...]] = None,
+ partial_reordering: Optional[list[tuple[str, ...]]] = None,
copy_from: Optional[Table] = None,
table_args: Tuple[Any, ...] = (),
table_kwargs: Mapping[str, Any] = util.immutabledict(),