ruff/crates/ty_python_semantic
David Peter 58a68f1bbd
[ty] Fall back to Divergent for deeply nested specializations (#20988)
## Summary

Fall back to `C[Divergent]` if we are trying to specialize `C[T]` with a
type that itself already contains deeply nested specialized generic
classes. This is a way to prevent infinite recursion for cases like
`self.x = [self.x]` where type inference for the implicit instance
attribute would not converge.

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

## Test Plan

Regression tests.
2025-10-22 14:29:10 +02:00
..
resources [ty] Fall back to Divergent for deeply nested specializations (#20988) 2025-10-22 14:29:10 +02:00
src [ty] Fall back to Divergent for deeply nested specializations (#20988) 2025-10-22 14:29:10 +02:00
tests [ty] Limit shown import paths to at most 5 unless ty runs with -v (#20912) 2025-10-16 13:18:09 +02:00
build.rs
Cargo.toml [ruff] Update schemars to v1 (#20942) 2025-10-20 08:59:52 +02:00
mdtest.py [ty] Faster iteration on mdtests (#20465) 2025-09-18 10:48:52 +00:00
mdtest.py.lock