[ty] Improve generic call expression inference by ibraheemdev · Pull Request #21210 · astral-sh/ruff (original) (raw)
added the ty
Multi-file analysis & type inference
label
This was referenced
Nov 3, 2025
ibraheemdev changed the base branch from main to ibraheem/typed-dict-assignability
Base automatically changed from ibraheem/typed-dict-assignability to main
ibraheemdev added a commit that referenced this pull request
…nce (#21275)
Summary
Splitting this one out from #21210. This is also something that should be made obselete by the new constraint solver, but is easy enough to fix now.
ibraheemdev added a commit that referenced this pull request
dcreager added a commit that referenced this pull request
- origin/main: (38 commits)
[ty] Make implicit submodule imports only occur in global scope (#21370)
[ty] introduce local variables for
fromimports of submodules in__init__.py(i)(#21173) [ruff] Ignorestr()when not used for simple conversion (RUF065) (#21330) [ty] implementtyping.NewTypeby addingType::NewTypeInstance[ty] supress inlay hints for+1and-1(#21368) [ty] Use type context for inference of generic constructors (#20933) [ty] Improve generic call expression inference (#21210) [ty] supress some trivial expr inlay hints (#21367) [configuration] Fix unclear error messages for line-length values exceedingu16::MAX(#21329) [ty] Fix incorrect inference ofenum.auto()for enums with non-intmixins, and imprecise inference ofenum.auto()for single-member enums (#20541) [refurb] Detect empty f-strings (FURB105) (#21348) [ty] provideimportcompletion when infrom <name> <name>statement (#21291) [ty] elide redundant inlay hints for function args (#21365) Fix syntax error false positive on alternativematchpatterns (#21362) Add a new "Opening a PR" section to the contribution guide (#21298) [flake8-simplify] Fix SIM222 false positive fortuple(generator) or None(SIM222) (#21187) Rebuild ruff binary instead of sharing it across jobs (#21361) [ty] Fix--excludeandsrc.excludemerging (#21341) [ty] Add support for properties that returnSelf(#21335) Add upstream linter URL toruff linter --output-format=json(#21316) ...
ibraheemdev added a commit that referenced this pull request
Instead of ignoring intermediate inference results, we can create a
temporary TypeInferenceBuilder and merge the chosen inference results
into the current region. This should hopefully reclaim some of the
performance regressions introduced by
#23844 and
#21210.
KotlinIsland pushed a commit to KotlinIsland/basedpython that referenced this pull request
…nce (#21275)
Summary
Splitting this one out from astral-sh/ruff#21210. This is also something that should be made obselete by the new constraint solver, but is easy enough to fix now.
KotlinIsland pushed a commit to KotlinIsland/basedpython that referenced this pull request
KotlinIsland pushed a commit to KotlinIsland/basedpython that referenced this pull request
Instead of ignoring intermediate inference results, we can create a
temporary TypeInferenceBuilder and merge the chosen inference results
into the current region. This should hopefully reclaim some of the
performance regressions introduced by
astral-sh/ruff#23844 and
astral-sh/ruff#21210.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})