Typing of a couple of parameters is wrong. They are set to be str or Optional[str] only, when they can accept lists or tuples. Specifically it's the following functions:
To Reproduce
Simply run mypy with parameters being a tuple or list of strings.
Error
************.py: note: In function "merge":
************.py:165: error: Argument "revisions" to "merge" has incompatible type "List[str]"; expected "str" [arg-type]
config, revisions=revisions, message=message, branch_label=branch_label
^
************.py: note: In function "revision":
************.py:262: error: Argument "depends_on" to "revision" has incompatible type "Tuple[str]"; expected "Optional[str]" [arg-type]
depends_on=depends_on,
^
************.py: note: In function "stamp":
************.py:302: error: Argument "revision" to "stamp" has incompatible type "Tuple[str]"; expected "str" [arg-type]
Describe the bug
Typing of a couple of parameters is wrong. They are set to be str or Optional[str] only, when they can accept lists or tuples. Specifically it's the following functions:
alembic.command.revision
-depends_on
parameteralembic.command.stamp
-revisions
parameteralembic.command.merge
-revisions
parameterExpected behavior
The typing should reflect the implementation.
To Reproduce Simply run mypy with parameters being a tuple or list of strings.
Error
Versions.
Additional context None
Have a nice day!