Skip to content

[ty] Used shared expression cache during generic call narrowing#24237

Closed
ibraheemdev wants to merge 1 commit intomainfrom
ibraheem/multi-inference-cache
Closed

[ty] Used shared expression cache during generic call narrowing#24237
ibraheemdev wants to merge 1 commit intomainfrom
ibraheem/multi-inference-cache

Conversation

@ibraheemdev
Copy link
Copy Markdown
Member

Use the expression cache added in #24219 more generally.

@ibraheemdev ibraheemdev added the ty Multi-file analysis & type inference label Mar 27, 2026
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Mar 27, 2026

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 86.59%. The percentage of expected errors that received a diagnostic held steady at 80.96%. The number of fully passing files held steady at 68/132.

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Mar 27, 2026

Memory usage report

Memory usage unchanged ✅

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Mar 27, 2026

ecosystem-analyzer results

Lint rule Added Removed Changed
unresolved-attribute 0 6 0
possibly-unresolved-reference 0 4 0
invalid-argument-type 0 3 0
missing-argument 0 2 0
no-matching-overload 0 2 0
unsupported-operator 0 1 0
Total 0 18 0
Raw diff (18 changes)
colour (https://github.com/colour-science/colour)
- colour/plotting/models.py:1066:21 error[invalid-argument-type] Argument to function `RGB_to_RGB` is incorrect: Expected `bool`, found `int | str | float | Any`

core (https://github.com/home-assistant/core)
- homeassistant/components/recorder/statistics.py:1532:29 warning[possibly-unresolved-reference] Name `new_max` used when possibly not defined
- homeassistant/components/recorder/statistics.py:1550:29 warning[possibly-unresolved-reference] Name `new_min` used when possibly not defined

django-stubs (https://github.com/typeddjango/django-stubs)
- mypy_django_plugin/lib/helpers.py:261:40 warning[possibly-unresolved-reference] Name `model_type` used when possibly not defined

freqtrade (https://github.com/freqtrade/freqtrade)
- freqtrade/exchange/exchange_utils.py:350:40 warning[possibly-unresolved-reference] Name `res` used when possibly not defined

ibis (https://github.com/ibis-project/ibis)
- ibis/expr/datatypes/tests/test_value.py:77:56 error[missing-argument] No argument provided for required parameter `value_type`
- ibis/expr/datatypes/tests/test_value.py:77:56 error[missing-argument] No argument provided for required parameter `value_type`
- ibis/expr/datatypes/tests/test_value.py:77:65 error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `Float64`
- ibis/expr/datatypes/tests/test_value.py:77:65 error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `Float64`

meson (https://github.com/mesonbuild/meson)
- mesonbuild/backend/vs2010backend.py:1994:78 error[unresolved-attribute] Attribute `get_build_dir` is not defined on `None` in union `Environment | None`

pandas (https://github.com/pandas-dev/pandas)
- pandas/core/groupby/grouper.py:655:62 error[unresolved-attribute] Attribute `ordered` is not defined on `Index`, `ndarray[tuple[Any, ...], dtype[Any]]` in union `Unknown | Index | ndarray[tuple[Any, ...], dtype[Any]] | Categorical`
- pandas/core/indexes/interval.py:1466:46 error[unsupported-operator] Operator `*` is not supported between objects of type `Number | number[Any, int | float | complex] | None | Unknown` and `float`

pandera (https://github.com/pandera-dev/pandera)
- tests/pandas/test_schema_statistics.py:58:33 error[no-matching-overload] No overload of function `to_datetime` matches arguments

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/server/database/dependencies.py:298:24 error[unresolved-attribute] Object of type `Self@__doc__` has no attribute `_func`
- src/prefect/server/database/dependencies.py:334:24 error[unresolved-attribute] Object of type `Self@__doc__` has no attribute `_func`

pycryptodome (https://github.com/Legrandin/pycryptodome)
- lib/Crypto/PublicKey/RSA.py:180:44 error[unresolved-attribute] Object of type `Self@_encrypt` has no attribute `_e`
- lib/Crypto/PublicKey/RSA.py:180:53 error[unresolved-attribute] Object of type `Self@_encrypt` has no attribute `_n`

xarray (https://github.com/pydata/xarray)
- xarray/tests/test_groupby.py:805:30 error[no-matching-overload] No overload of function `cut` matches arguments

Full report with detailed diff (timing results)

@ibraheemdev ibraheemdev marked this pull request as draft March 27, 2026 03:29
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 27, 2026

Merging this PR will improve performance by 12.02%

⚡ 1 improved benchmark
✅ 27 untouched benchmarks
⏩ 30 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime colour_science 59.9 s 53.5 s +12.02%

Comparing ibraheem/multi-inference-cache (b0c16f2) with main (690ef81)

Open in CodSpeed

Footnotes

  1. 30 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@ibraheemdev
Copy link
Copy Markdown
Member Author

Nevermind, we can't actually do it in this case, we need each speculative attempt to have independent diagnostics. Unless there was a separate diagnostics cache...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants