mirror of https://github.com/astral-sh/ruff
## Summary By taking a purely syntactic approach to the problem of trivial initializer calls we can supress `x: T = T()`, `x: T = x.y.T()` and `x: MyNewType = MyNewType(0)` but still display `x: T[U] = T()`. The place where we drop a ball is this does not compose with our analysis for supressing `x = (0, "hello")` as `x = (0, T())` and `x = (T(), T())` will still get inlay hints (I don't think this is a huge deal). * fixes https://github.com/astral-sh/ty/issues/1516 ## Test Plan Existing snapshots cover this well. |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||