ruff/crates/ty_python_semantic/resources
David Peter ab46c8de0f
[ty] Add support for properties that return Self (#21335)
## Summary

Detect usages of implicit `self` in property getters, which allows us to
treat their signature as being generic.

closes https://github.com/astral-sh/ty/issues/1502

## Typing conformance

Two new type assertions that are succeeding.

## Ecosystem results

Mostly look good. There are a few new false positives related to a bug
with constrained typevars that is unrelated to the work here. I reported
this as https://github.com/astral-sh/ty/issues/1503.

## Test Plan

Added regression tests.
2025-11-10 11:13:36 +01:00
..
corpus [ty] Fix panic due to simplifying Divergent types out of intersections types (#21253) 2025-11-03 15:41:11 +00:00
mdtest [ty] Add support for properties that return Self (#21335) 2025-11-10 11:13:36 +01:00
primer [ty] Add cycle handling to lazy_default (#20967) 2025-10-23 10:05:08 +02:00
README.md

Markdown files within the mdtest/ subdirectory are tests of type inference and type checking; executed by the tests/mdtest.rs integration test.

See crates/ty_test/README.md for documentation of this test format.