Skip to content

Commit

Permalink
Fixes: #1348 Typings for target_metadata sequence of metadatas
Browse files Browse the repository at this point in the history
<!-- Provide a general summary of your proposed changes in the Title field above -->

Ref #1348

Add `Sequence[MetaData]` typing to `target_metadata` args.

### Description
<!-- Describe your changes in detail -->

### 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: #1349
Pull-request: #1349
Pull-request-sha: 5fcdaf5

Change-Id: Idd341a69aa024be1f6374fc0faa6b2519ff222bd
  • Loading branch information
Iuri de Silvio authored and sqla-tester committed Nov 8, 2023
1 parent fba7492 commit 78159ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion alembic/context.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ from typing import Mapping
from typing import MutableMapping
from typing import Optional
from typing import overload
from typing import Sequence
from typing import TextIO
from typing import Tuple
from typing import TYPE_CHECKING
Expand Down Expand Up @@ -97,7 +98,7 @@ def configure(
tag: Optional[str] = None,
template_args: Optional[Dict[str, Any]] = None,
render_as_batch: bool = False,
target_metadata: Optional[MetaData] = None,
target_metadata: Union[MetaData, Sequence[MetaData], None] = None,
include_name: Optional[
Callable[
[
Expand Down
3 changes: 2 additions & 1 deletion alembic/runtime/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from typing import MutableMapping
from typing import Optional
from typing import overload
from typing import Sequence
from typing import TextIO
from typing import Tuple
from typing import TYPE_CHECKING
Expand Down Expand Up @@ -416,7 +417,7 @@ def configure(
tag: Optional[str] = None,
template_args: Optional[Dict[str, Any]] = None,
render_as_batch: bool = False,
target_metadata: Optional[MetaData] = None,
target_metadata: Union[MetaData, Sequence[MetaData], None] = None,
include_name: Optional[IncludeNameFn] = None,
include_object: Optional[IncludeObjectFn] = None,
include_schemas: bool = False,
Expand Down

0 comments on commit 78159ab

Please sign in to comment.