23 Feb
2021
23 Feb
'21
4:07 p.m.
Jelle, that's a good point. One option is to special-case the `value` attribute and allow it to be annotated with the intended value type. That wouldn't allow different enumeration members to have different types though. I don't have any good suggestions for how to address this without introducing compatibility issues with existing stubs and type checkers. For now, I've updated pyright's logic to change its behavior based on whether it's analyzing a stub or non-stub file. If you're interested in the specifics, please refer to this issue in the pyright issue tracker: https://github.com/microsoft/pyright/issues/1521. -- Eric Traut Contributor to Pyright & Pylance Microsoft Corp.