Skip to content

Consider --allow-redefinition for mypy #3832

@mpharrigan

Description

@mpharrigan

See python/mypy#1174 for full context, but there are common idioms where you may want to re-use a variable name

items: Set[Item] = set()
items.add(...)
items = frozenset(items)

Mypy currently complains. They added a flag: python/mypy#6197 which may or may not become the default at some point. I say we add this to our mypy configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/mypykind/healthFor CI/testing/release process/refactoring/technical debt itemstriage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked on

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions