Support enum Literals in the enum plugin
This makes the enum plugin (e.g. .name and .value) work on enum Literals.
Fixes https://github.com/python/mypy/issues/14092
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
While at it, should we mention something in https://mypy.readthedocs.io/en/stable/literal_types.html about being able to use enums as literals?
While at it, should we mention something in https://mypy.readthedocs.io/en/stable/literal_types.html about being able to use enums as literals?
I don't think the enum plugin is mentioned there already (i.e. specifically .value and .name behavior) so I'm not going to update it.
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
I don't think the enum plugin is mentioned there already (i.e. specifically .value and .name behavior) so I'm not going to update it.
One thing that worries me is that we don't have a good way to track documenting user-facing changes.