Latest Results
[ty] Improve `type=` mixin support for functional `Enum(...)` (#24571)
## Summary
We now return `Unknown` for members in cases in which a `type=` mixin is
used with explicit values, like:
```python
E = Enum("E", {"A": "1", "B": 1}, type=int)
```
Since in this case, `B` would actually be an alias of `A`.
If it's a non-explicit form (like `Enum("E", "A B", type=str)`), we
return values of the provided `type` (but not literals), with known
members. We could probably do a better job with the values in some of
these cases, but it doesn't seem worth it to me right now.
If the `type=` is incompatible with the enum base (e.g., `BadIntEnum =
IntEnum("BadIntEnum", "RED", type=str)`), we also throw an error. Latest Branches
0%
anishgirianish:fix/b909-break-continue-branch-tracking 0%
A4-Tacks:unwrap-block-action 0%
© 2026 CodSpeed Technology