Closed
Description
mypy has a false positive here:
from enum import Enum
class E(Enum):
_ignore_ = "" # mypy error: Cannot override writable attribute "_ignore_" with a final one [misc]
Is this actually a typeshed problem? enum.pyi has _ignore_: str | list[str]
. Should that be Final? Or, would that be papering over the problem since _ignore_
doesn't actually exist after the metaclass processes the class body?
Your Environment
WSL Ubuntu 20.04
python 3.8.10
mypy 0.931
No flags or config file.
Workaround (type:ignore[misc]) is easy enough for now.