-
Suggestion
-
Resolution: Fixed
-
P3: Somewhat important
-
6.8, 6.9
-
None
-
45b9a7de8 (dev), 0a0b59d82 (6.9), 822397986 (tqtc/lts-6.8), 9036d8c2d (tqtc/dev), 436bc5e3c (tqtc/6.10), dd9ac00b8 (tqtc/6.9), 1703555f0 (tqtc/6.8), ba2125cc8 (tqtc/dev), 2a8527773 (tqtc/6.10), 090937ab4 (tqtc/dev)
Since ~January 2024, it is part of the typing spec that Enums in stubs can specify their exact values and type-checkers can use those.
The related spec section:[ https://typing.python.org/en/latest/spec/enums.html#defining-members|https://typing.python.org/en/latest/spec/enums.html#defining-members]
Refs for when this was added:
- https://discuss.python.org/t/draft-of-typing-spec-chapter-for-enums/43496
- https://github.com/python/typing-council/issues/11
- https://github.com/python/typing/pull/1759
So instead of

You can now have

| For Gerrit Dashboard: PYSIDE-3164 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 671020,3 | type hints: Uncomment the exact enum values | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
| 674097,2 | type hints: Uncomment the exact enum values | 6.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
| 674145,2 | type hints: Uncomment the exact enum values | tqtc/lts-6.8 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |
| 676174,3 | type hints: Temporarily exclude QtOpcUa from mypy_correctness_test testing | tqtc/dev | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |
| 676281,2 | type hints: Temporarily exclude QtOpcUa from mypy_correctness_test testing | tqtc/6.10 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |
| 676282,1 | type hints: Temporarily exclude QtOpcUa from mypy_correctness_test testing | tqtc/lts-6.8 | pyside/tqtc-pyside-setup | Status: ABANDONED | -1 | 0 |
| 676359,2 | type hints: Temporarily exclude QtOpcUa from mypy_correctness_test testing | tqtc/6.9 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |
| 676434,2 | type hints: Temporarily exclude QtOpcUa from mypy_correctness_test testing | tqtc/6.8 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |
| 678702,3 | type hints: Exclude specifying enum values for QOpcUa.NodeIds.Namespace0 | tqtc/dev | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |
| 679081,2 | type hints: Exclude specifying enum values for QOpcUa.NodeIds.Namespace0 | tqtc/6.10 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |
| 683529,2 | Revert "type hints: Temporarily exclude QtOpcUa from mypy_correctness_test testing" | tqtc/dev | pyside/tqtc-pyside-setup | Status: ABANDONED | +2 | +1 |
| 683943,3 | WIP: existence test: print module times | tqtc/dev | pyside/tqtc-pyside-setup | Status: ABANDONED | -2 | -1 |
| 684059,2 | Revert "type hints: Exclude specifying enum values for QOpcUa.NodeIds.Namespace0" | tqtc/dev | pyside/tqtc-pyside-setup | Status: MERGED | +2 | +1 |