Closed
Description
Bug Report
Mypy incorrectly identifies an enum as final. This appears related to / caused by #11247.
To Reproduce
- create an enum with uninitialized annotated variables and a
__new__
method - extend the enum with the actual values for the enum
Expected Behavior
Mypy would not complain about the enum.
Actual Behavior
error: Cannot inherit from final class "TestEnum" [misc]
Your Environment
- Mypy version used: https://github.com/mypyc/mypy_mypyc-wheels/releases/tag/v0.920%2Bdev.89bb94a636790fc969979a47d8cb88e33a22c17e
- Mypy command-line flags:
- Mypy configuration options from
mypy.ini
(and other config files):[mypy] allow_redefinition = true disable_error_code = override, var-annotated mypy_path = types/ plugins = mypy_django_plugin.main numpy.typing.mypy_plugin, mypy_drf_plugin.main pretty = true show_error_codes = true show_error_context = true warn_redundant_casts = true warn_unused_ignores = true warn_unreachable = true
- Python version used: 3.10.0
- Operating system and version: N/A