Incompatible return value type type[Enum]
when returning a functional-style Enum
#17147
Labels
type[Enum]
when returning a functional-style Enum
#17147
Bug Report
When returning a functional-style
Enum
class from a function with the return typetype[Enum]
mypy reports an error.When the created
Enum
class is assigned to a variable and the variable is return, mypy does not report an error.To Reproduce
Gist URL
Playground URL
Expected Behavior
no mypy warnings
Actual Behavior
main.py:4: error: Incompatible return value type (got "Enum", expected "type[Enum]") [return-value]
Your Environment
1.9.0
andmaster
on mypy-play.netmypy.ini
(and other config files): mypy-play.net defaults3.12
The text was updated successfully, but these errors were encountered: