ruff
6f2b7722 - [ty] Preserve nominal type of enum.property instances (#25849)

Commit
140 days ago
[ty] Preserve nominal type of enum.property instances (#25849) ## Summary This is a follow-up to #25681 that preserves the nominal class of synthesized property instances created by `enum.property`. Previously, `PropertyInstanceType` always fell back to `builtins.property`. That discarded the `enum.property` identity, so assignments to `enum.property` failed and enum-specific members such as `name`, `clsname`, and `member` were unavailable. The originating known class is now retained through accessor replacement, type transformations, member lookup, descriptor dispatch, relations, `super`, and display. The regression coverage also checks precise getter and setter behavior. A TODO documents the remaining limitation that constructing a subclass of `enum.property` currently collapses the result to `enum.property`. ## Test Plan Added/updated mdtests.
Author
Parents
Loading