Skip to content

Minor typing issue for alembic.context.configure in 1.11.0 #1246

@AlexanderPodorov

Description

@AlexanderPodorov

Describe the bug
Signature of the alembic.context.configure function has changed in 1.11.0, where compare_server_default argument uses Column classes, which should be generics. This kind of definition produces type checkers warnings.

Expected behavior
No warnings reported by static type checkers

To Reproduce
E.g. using VSCode with Pyright in "strict" mode (usually it is a part of env.py):

from alembic.context import configure
# Throws: Type of "configure" is partially unknown

Versions.

  • OS: MacOS
  • Python: 3.11.3
  • Alembic: 1.11.0
  • SQLAlchemy: 2.0.13
  • Database: Postgres 15
  • DBAPI: asyncpg

Additional context

Have a nice day!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpep 484typing related issues

    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