Skip to content

[mypy] error: Argument 1 to "execute" has incompatible type "Delete"; expected "Union[str, TextClause, Update]" #1058

Description

@arjenzorgdoc

Describe the bug
mypy doesn't allow Delete() as parameter to op.execute().

Expected behavior
no mypy error?

To Reproduce

from alembic import op
from sqlalchemy import table            
op.execute(table("test").delete())

Error

test.py:3: error: Argument 1 to "execute" has incompatible type "Delete"; expected "Union[str, TextClause, Update]"

Versions.

  • OS: linux
  • Python: 3.8
  • Alembic: 1.8.0
  • SQLAlchemy: 1.3.18
  • Database: n/a
  • DBAPI: n/a

Have a nice day!
Thanks!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions