mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-25 06:13:01 +00:00
## Summary From #17371 In #17371, `DivergentType` was introduced to prevent type inference for recursive functions from diverging and causing panics. This turned out to be useful for other divergent type inferences (https://github.com/astral-sh/ruff/pull/17371#discussion_r2329337965), so I extracted the introduction part of `DivergentType` into this PR so that we can use it without waiting for the merge of #17371. Note that this PR only introduces `DivergentType` and does not actually address divergent type inference yet. Please refer to https://github.com/astral-sh/ruff/pull/17371/files#diff-20b910c6e20faa962bb1642e111db1cbad8e66ace089bdd966ac9d7f9fa99ff2R542-R622 etc. when implementing handling of divergence suppression using this type. ## Test Plan --------- Co-authored-by: Carl Meyer <carl@oddbird.net> |
||
|---|---|---|
| .. | ||
| resources | ||
| src | ||
| tests | ||
| build.rs | ||
| Cargo.toml | ||
| mdtest.py | ||
| mdtest.py.lock | ||