Skip to content

v1.10.4 -> v1.11.0: pyright: "__setitem__" method not defined on type "Mapping[str, str]" #1244

@gitpushdashf

Description

@gitpushdashf

Hi Alembic and all,

There seems to be a type change (for better or for worse) that's being caught by pyright -- possibly others.

We have a migration env.py with a statement like configuration["sqlalchemy.url"] = database that's throwing the error when pyright runs. With v1.10.4, there's no such error. I'm not sure if this is part of autogenerated output, if the code was a bit invalid from the start, or if there's something else going on.

In this case, configuration = config.get_section(config.config_ini_section), config = context.config, and from alembic import context.

Let me know if I can provide anything else to help debug.

Thanks!

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