Skip to content

IntEnum "is not indexable" #4941

@alexmv

Description

@alexmv
from enum import IntEnum
Color = IntEnum('Color', 'red green blue')
Color['green']

...yields:

test.py:3: error: Value of type "Type[Color]" is not indexable

This example is more or less straight out of the enum docs -- my expectation is that it should not be a type error.

Mypy version 025e3de

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions