We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Assume this definition of Color:
Color
from enum import Enum class Color(Enum): red = 1 green = 2 blue = 3
Now this should be valid, but mypy complains about it:
Color['red']
The error message indicates that mypy thinks that the programmer is trying to construct a generic type, which is not the case here:
$ mypy t.py t.py:8: error: Name 'red' is not defined