ruff/crates/ty_python_semantic
David Peter 385d6fa608
[ty] Detect enums if metaclass is a subtype of EnumType/EnumMeta (#19481)
## Summary

This PR implements the following section from the [typing spec on
enums](https://typing.python.org/en/latest/spec/enums.html#enum-definition):

> Enum classes can also be defined using a subclass of `enum.Enum` **or
any class that uses `enum.EnumType` (or a subclass thereof) as a
metaclass**. Note that `enum.EnumType` was named `enum.EnumMeta` prior
to Python 3.11.

part of https://github.com/astral-sh/ty/issues/183

## Test Plan

New Markdown tests
2025-07-23 08:46:51 +02:00
..
resources [ty] Detect enums if metaclass is a subtype of EnumType/EnumMeta (#19481) 2025-07-23 08:46:51 +02:00
src [ty] Detect enums if metaclass is a subtype of EnumType/EnumMeta (#19481) 2025-07-23 08:46:51 +02:00
tests [ty] Track open files in the server (#19264) 2025-07-18 19:33:35 +05:30
build.rs
Cargo.toml [ty] Use ThinVec for sub segments in PlaceExpr (#19470) 2025-07-22 20:39:39 +02:00
mdtest.py
mdtest.py.lock