Open jace opened 3 years ago
mypy raised an error on this code:
DDL(stmt).execute_if(dialect='postgresql')
error: Argument "dialect" to "execute_if" of "DDLElement" has incompatible type "str"; expected "Optional[Dialect]"
However, the documentation for this method and source code suggest that the expected type is:
Optional[Union[str, Tuple[str, ...], List[str], Set[str]]].
Optional[Union[str, Tuple[str, ...], List[str], Set[str]]]
Location of problem:
https://github.com/dropbox/sqlalchemy-stubs/blob/55470ceab8149db983411d5c094c9fe16343c58b/sqlalchemy-stubs/sql/ddl.pyi#L36
mypy raised an error on this code:
error: Argument "dialect" to "execute_if" of "DDLElement" has incompatible type "str"; expected "Optional[Dialect]"
However, the documentation for this method and source code suggest that the expected type is:
Optional[Union[str, Tuple[str, ...], List[str], Set[str]]]
.Location of problem:
https://github.com/dropbox/sqlalchemy-stubs/blob/55470ceab8149db983411d5c094c9fe16343c58b/sqlalchemy-stubs/sql/ddl.pyi#L36