Skip to content

Incomplete typing for Engine.dispose's close parameter #243

@satyanash

Description

@satyanash

Describe the bug
SQLAlchemy release 1.4.33 added a new optional close: bool = True parameter to Engine#dispose().
This is not declared in the type definition, at

def dispose(self) -> None: ...

Expected behavior
The current type definition should declare the close parameter.

To Reproduce
Call Engine.dispose(close) and then run mypy on it with sqlalchemy2-stubs.

engine.dispose(close=False)

Error

error: Too many arguments for "dispose" of "Engine"

Versions.

  • OS: Darwin Kernel Version 21.6.0
  • Python: 3.7.10
  • SQLAlchemy: 1.4.39
  • mypy: 0.931
  • SQLAlchemy2-stubs: 0.0.2a29

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions