Skip to content

Comments

[ty] Fix invalid diagnostic location for a sub-call to a specialized ParamSpec#23036

Merged
dhruvmanila merged 15 commits intoastral-sh:mainfrom
11happy:fix_diagnostic_location
Feb 9, 2026
Merged

[ty] Fix invalid diagnostic location for a sub-call to a specialized ParamSpec#23036
dhruvmanila merged 15 commits intoastral-sh:mainfrom
11happy:fix_diagnostic_location

Conversation

@11happy
Copy link
Contributor

@11happy 11happy commented Feb 2, 2026

Summary

This PR fixes part of astral-sh/ty#2198

Test Plan

Added mdtest & snapshots:
Sample Example
for code:

from typing import Callable
def fn(a: int) -> None: ...
def foo[**P, T](fn: Callable[P, T], *args: P.args, **kwargs: P.kwargs): ...
foo(fn, a=1, unknown_param=2) 

before

error[unknown-argument]: Argument `unknown_param` does not match any known parameter of function `foo`
 --> temp.py:8:9
  |
8 | foo(fn, a=1, unknown_param=2)
  |         ^^^
  |
info: Function signature here
 --> temp.py:5:5
  |
4 | def fn(a: int) -> None: ...
5 | def foo[**P, T](fn: Callable[P, T], *args: P.args, **kwargs: P.kwargs): ...
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
info: rule `unknown-argument` is enabled by default

After:

error[unknown-argument]: Argument `unknown_param` does not match any known parameter of function `foo`
 --> temp.py:8:14
  |
8 | foo(fn, a=1, unknown_param=2)
  |              ^^^^^^^^^^^^^^^
  |
info: Function signature here
 --> temp.py:5:5
  |
4 | def fn(a: int) -> None: ...
5 | def foo[**P, T](fn: Callable[P, T], *args: P.args, **kwargs: P.kwargs): ...
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
info: rule `unknown-argument` is enabled by default

Signed-off-by: Bhuminjay <[email protected]>
@11happy 11happy force-pushed the fix_diagnostic_location branch from 60fc1a5 to 5c27788 Compare February 2, 2026 12:15
@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 2, 2026

Typing conformance results

No changes detected ✅

Signed-off-by: Bhuminjay <[email protected]>
Signed-off-by: Bhuminjay <[email protected]>
@sharkdp sharkdp added the ty Multi-file analysis & type inference label Feb 2, 2026
Copy link
Member

@dhruvmanila dhruvmanila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I've some changes that I've recommended but otherwise this looks good.

@dhruvmanila dhruvmanila added the diagnostics Related to reporting of diagnostics. label Feb 3, 2026
@dhruvmanila
Copy link
Member

(I've removed the "fixes" directive as there are other parts that are still remaining after this PR.)

@AlexWaygood AlexWaygood removed their request for review February 3, 2026 04:08
@sharkdp sharkdp removed their request for review February 3, 2026 10:12
@carljm carljm removed their request for review February 3, 2026 17:22
11happy and others added 2 commits February 4, 2026 07:51
Signed-off-by: Bhuminjay <[email protected]>
…c_errors.md_-_test_for_paramspec_e…_(4b332d9e024d6e7b).snap
@11happy
Copy link
Contributor Author

11happy commented Feb 5, 2026

mypy_primer test is faling, I am not sure how to fix it. would appreciate any pointers to fix that.
Thank you

@carljm
Copy link
Contributor

carljm commented Feb 6, 2026

Mypy-primer is failing because of this panic: https://github.com/astral-sh/ruff/actions/runs/21655910487/job/62430518631?pr=23036#step:6:1100

Seems likely to have been introduced by the changes in this PR.

If you are not sure what the cause is, you can clone jax and run ty on it and try to reproduce locally.

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 6, 2026

mypy_primer results

Changes were detected when running on open source projects
Expression (https://github.com/cognitedata/Expression)
- tests/test_compose.py:21:16: error[invalid-assignment] Object of type `(Never, /) -> Never` is not assignable to `(int, /) -> int`
- Found 205 diagnostics
+ Found 204 diagnostics

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/cli/dashboard.py:27:37: error[invalid-argument-type] Argument to function `run_sync_in_worker_thread` is incorrect: Expected `str`, found `str | None`
+ src/prefect/cli/dashboard.py:27:62: error[invalid-argument-type] Argument to function `run_sync_in_worker_thread` is incorrect: Expected `str`, found `str | None`
- src/prefect/cli/flow_run.py:153:41: error[invalid-argument-type] Argument to function `run_sync_in_worker_thread` is incorrect: Expected `str`, found `str | None`
+ src/prefect/cli/flow_run.py:153:66: error[invalid-argument-type] Argument to function `run_sync_in_worker_thread` is incorrect: Expected `str`, found `str | None`
- src/prefect/cli/task_run.py:82:41: error[invalid-argument-type] Argument to function `run_sync_in_worker_thread` is incorrect: Expected `str`, found `str | None`
+ src/prefect/cli/task_run.py:82:66: error[invalid-argument-type] Argument to function `run_sync_in_worker_thread` is incorrect: Expected `str`, found `str | None`
- src/prefect/deployments/runner.py:1017:70: warning[possibly-missing-attribute] Attribute `__name__` may be missing on object of type `Unknown | (((...) -> Any) & ((*args: object, **kwargs: object) -> object))`
+ src/prefect/deployments/runner.py:1017:70: warning[possibly-missing-attribute] Attribute `__name__` may be missing on object of type `Unknown | ((...) -> Any)`
+ src/prefect/flow_engine.py:1004:32: error[invalid-await] `Unknown | R@FlowRunEngine | Coroutine[Any, Any, R@FlowRunEngine]` is not awaitable
+ src/prefect/flow_engine.py:1610:24: error[invalid-await] `Unknown | R@AsyncFlowRunEngine | Coroutine[Any, Any, R@AsyncFlowRunEngine]` is not awaitable
+ src/prefect/flow_engine.py:1691:43: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Unknown | R@run_generator_flow_sync`
+ src/prefect/flow_engine.py:1699:21: warning[possibly-missing-attribute] Attribute `throw` may be missing on object of type `Unknown | R@run_generator_flow_sync`
+ src/prefect/flow_engine.py:1733:44: warning[possibly-missing-attribute] Attribute `__anext__` may be missing on object of type `Unknown | R@run_generator_flow_async`
+ src/prefect/flow_engine.py:1740:25: warning[possibly-missing-attribute] Attribute `throw` may be missing on object of type `Unknown | R@run_generator_flow_async`
- src/prefect/flows.py:286:34: error[unresolved-attribute] Object of type `((**P@Flow) -> R@Flow) & ((*args: object, **kwargs: object) -> object)` has no attribute `__name__`
+ src/prefect/flows.py:286:34: error[unresolved-attribute] Object of type `(**P@Flow) -> R@Flow` has no attribute `__name__`
- src/prefect/flows.py:404:68: error[unresolved-attribute] Object of type `((**P@Flow) -> R@Flow) & ((*args: object, **kwargs: object) -> object)` has no attribute `__name__`
+ src/prefect/flows.py:404:68: error[unresolved-attribute] Object of type `(**P@Flow) -> R@Flow` has no attribute `__name__`
- src/prefect/flows.py:1886:53: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ src/prefect/flows.py:1946:21: error[no-matching-overload] No overload of function `run_coro_as_sync` matches arguments
- src/prefect/runtime/flow_run.py:155:25: error[invalid-argument-type] Argument to function `create_call` is incorrect: Expected `str`, found `str | None`
+ src/prefect/runtime/flow_run.py:155:40: error[invalid-argument-type] Argument to function `create_call` is incorrect: Expected `str`, found `str | None`
- src/prefect/runtime/flow_run.py:170:25: error[invalid-argument-type] Argument to function `create_call` is incorrect: Expected `str`, found `str | None`
+ src/prefect/runtime/flow_run.py:170:40: error[invalid-argument-type] Argument to function `create_call` is incorrect: Expected `str`, found `str | None`
- src/prefect/runtime/flow_run.py:185:25: error[invalid-argument-type] Argument to function `create_call` is incorrect: Expected `str`, found `str | None`
+ src/prefect/runtime/flow_run.py:185:40: error[invalid-argument-type] Argument to function `create_call` is incorrect: Expected `str`, found `str | None`
- src/prefect/runtime/flow_run.py:200:25: error[invalid-argument-type] Argument to function `create_call` is incorrect: Expected `str`, found `str | None`
+ src/prefect/runtime/flow_run.py:200:45: error[invalid-argument-type] Argument to function `create_call` is incorrect: Expected `str`, found `str | None`
- src/prefect/runtime/flow_run.py:215:25: error[invalid-argument-type] Argument to function `create_call` is incorrect: Expected `str`, found `str | None`
+ src/prefect/runtime/flow_run.py:215:45: error[invalid-argument-type] Argument to function `create_call` is incorrect: Expected `str`, found `str | None`
- src/prefect/runtime/flow_run.py:230:25: error[invalid-argument-type] Argument to function `create_call` is incorrect: Expected `str`, found `str | None`
+ src/prefect/runtime/flow_run.py:230:40: error[invalid-argument-type] Argument to function `create_call` is incorrect: Expected `str`, found `str | None`
- src/prefect/runtime/flow_run.py:269:25: error[invalid-argument-type] Argument to function `create_call` is incorrect: Expected `str`, found `UUID | (Unknown & ~None)`
+ src/prefect/runtime/flow_run.py:269:40: error[invalid-argument-type] Argument to function `create_call` is incorrect: Expected `str`, found `UUID | (Unknown & ~None)`
- Found 5484 diagnostics
+ Found 5490 diagnostics

ibis (https://github.com/ibis-project/ibis)
- ibis/examples/gen_registry.py:266:17: error[invalid-argument-type] Argument to bound method `submit` is incorrect: Expected `Path`, found `Unknown | str`
+ ibis/examples/gen_registry.py:267:17: error[invalid-argument-type] Argument to bound method `submit` is incorrect: Expected `Path`, found `Unknown | str`

sympy (https://github.com/sympy/sympy)
+ sympy/algebras/tests/test_quaternion.py:422:33: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/codegen/tests/test_matrix_nodes.py:27:21: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/eigen.py:1202:37: error[unresolved-attribute] Object of type `T2'return@call_highest_priority | T1'return@call_highest_priority` has no attribute `pow`
+ sympy/matrices/expressions/tests/test_blockmatrix.py:235:13: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/expressions/tests/test_blockmatrix.py:235:33: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/expressions/tests/test_blockmatrix.py:235:53: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/expressions/tests/test_blockmatrix.py:459:12: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/expressions/tests/test_derivatives.py:551:26: error[unsupported-operator] Operator `+` is not supported between two objects of type `MatrixBase | Expr`
+ sympy/matrices/expressions/tests/test_matadd.py:36:12: error[unsupported-operator] Operator `+` is not supported between objects of type `MatrixBase` and `MatrixBase | Expr`
+ sympy/matrices/expressions/tests/test_matpow.py:124:47: error[unsupported-operator] Operator `+` is not supported between two objects of type `ImmutableDenseMatrix`
+ sympy/matrices/inverse.py:385:11: error[unsupported-operator] Operator `-` is not supported between objects of type `MatrixBase` and `MatrixBase | Expr | Unknown`
+ sympy/matrices/inverse.py:393:11: error[unsupported-operator] Operator `+` is not supported between objects of type `MatrixBase` and `MatrixBase | Expr | Unknown`
+ sympy/matrices/matrixbase.py:979:18: error[unsupported-operator] Operator `+` is not supported between two objects of type `Self@_eval_wilkinson`
+ sympy/matrices/matrixbase.py:2957:16: error[invalid-return-type] Return type does not match returned value: expected `Self@_eval_pow_by_cayley`, found `Self@_eval_pow_by_cayley | T2'return@call_highest_priority | T1'return@call_highest_priority`
+ sympy/matrices/matrixbase.py:3256:16: error[invalid-return-type] Return type does not match returned value: expected `MatrixBase`, found `T2'return@call_highest_priority | T1'return@call_highest_priority`
+ sympy/matrices/matrixbase.py:3256:29: error[invalid-argument-type] Argument is incorrect: Expected `T2'return@call_highest_priority | T1'return@call_highest_priority`, found `MatrixBase`
+ sympy/matrices/matrixbase.py:3310:16: error[unsupported-operator] Operator `+` is not supported between two objects of type `MatrixBase`
+ sympy/matrices/matrixbase.py:3314:16: error[invalid-return-type] Return type does not match returned value: expected `Tmat@__sub__`, found `MatrixBase`
+ sympy/matrices/matrixbase.py:4386:16: error[unsupported-operator] Operator `+` is not supported between two objects of type `Self@add`
+ sympy/matrices/matrixbase.py:4923:16: error[invalid-return-type] Return type does not match returned value: expected `Self@analytic_func`, found `Self@analytic_func | T2'return@call_highest_priority | T1'return@call_highest_priority`
+ sympy/matrices/repmatrix.py:321:17: error[unsupported-operator] Operator `-` is not supported between two objects of type `Self@_eval_is_symmetric`
+ sympy/matrices/tests/test_commonmatrix.py:1249:31: error[unsupported-operator] Operator `+` is not supported between objects of type `MutableDenseMatrix` and `ImmutableDenseNDimArray`
+ sympy/matrices/tests/test_eigen.py:406:20: error[invalid-argument-type] Argument to function `max` is incorrect: Expected `Iterable[Unknown]`, found `MatrixBase | Unknown`
+ sympy/matrices/tests/test_immutable.py:105:23: error[unsupported-operator] Operator `+` is not supported between two objects of type `ImmutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:121:12: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:123:32: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:141:12: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:2179:22: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:2207:26: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:2908:21: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:2921:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:2936:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:2937:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:2948:14: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:3471:21: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:3478:12: warning[possibly-missing-attribute] Attribute `rank` may be missing on object of type `MatrixBase | MatrixExpr | Unknown`
+ sympy/matrices/tests/test_matrices.py:3479:12: warning[possibly-missing-attribute] Attribute `rank` may be missing on object of type `MatrixBase | MatrixExpr | Unknown`
+ sympy/matrices/tests/test_matrixbase.py:491:12: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:493:32: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:544:12: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:823:31: error[unsupported-operator] Operator `+` is not supported between objects of type `MutableDenseMatrix` and `ImmutableDenseNDimArray`
+ sympy/matrices/tests/test_matrixbase.py:876:12: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:878:32: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:900:12: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:2931:22: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:2959:26: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:3610:21: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:3624:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:3639:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:3640:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:3652:14: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_reductions.py:377:21: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_reductions.py:384:12: warning[possibly-missing-attribute] Attribute `rank` may be missing on object of type `MatrixBase | MatrixExpr | Unknown`
+ sympy/matrices/tests/test_reductions.py:385:12: warning[possibly-missing-attribute] Attribute `rank` may be missing on object of type `MatrixBase | MatrixExpr | Unknown`
+ sympy/matrices/tests/test_solvers.py:68:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_sparse.py:573:12: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableSparseMatrix`
+ sympy/matrices/tests/test_sparse.py:577:52: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableSparseMatrix`
+ sympy/matrices/tests/test_sparse.py:593:17: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableSparseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:13:6: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:16:38: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:16:84: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:16:131: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:21:44: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:21:90: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:21:137: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:25:37: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:25:83: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:25:130: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/mathematica.py:692:38: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Iterable[Never]`, found `Unknown | list[Unknown | str]`
+ sympy/physics/control/tests/test_lti.py:3733:31: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/physics/control/tests/test_lti.py:3733:38: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/physics/mechanics/lagrange.py:222:23: error[unsupported-operator] Operator `-` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/physics/mechanics/lagrange.py:346:17: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/physics/mechanics/linearize.py:217:28: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/physics/mechanics/linearize.py:229:29: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/physics/mechanics/linearize.py:241:29: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/physics/mechanics/tests/test_jointsmethod.py:247:17: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/physics/mechanics/tests/test_jointsmethod.py:249:17: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/physics/quantum/tests/test_represent.py:89:17: error[unsupported-operator] Operator `+` is not supported between objects of type `MatrixBase | Expr` and `MatrixBase`
+ sympy/physics/quantum/tests/test_represent.py:91:24: error[unsupported-operator] Operator `-` is not supported between two objects of type `MatrixBase | Expr`
+ sympy/physics/quantum/tests/test_represent.py:93:28: error[unsupported-operator] Operator `+` is not supported between two objects of type `MatrixBase | Expr`
+ sympy/physics/vector/functions.py:380:21: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `MatrixBase | Unknown`
+ sympy/solvers/tests/test_numeric.py:137:11: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/solvers/tests/test_solvers.py:722:19: error[unsupported-operator] Operator `-` is not supported between two objects of type `MatrixBase | Expr`
+ sympy/solvers/tests/test_solvers.py:723:19: error[unsupported-operator] Operator `-` is not supported between two objects of type `MatrixBase | Expr`
+ sympy/solvers/tests/test_solvers.py:724:19: error[unsupported-operator] Operator `-` is not supported between two objects of type `MatrixBase | Expr`
+ sympy/solvers/tests/test_solvers.py:724:30: error[unsupported-operator] Operator `-` is not supported between two objects of type `MatrixBase | Expr`
+ sympy/stats/tests/test_symbolic_multivariate.py:84:36: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/stats/tests/test_symbolic_multivariate.py:84:84: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/stats/tests/test_symbolic_multivariate.py:85:36: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/tensor/tests/test_tensor.py:1693:19: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/tensor/tests/test_tensor.py:1694:23: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
- Found 15789 diagnostics
+ Found 15881 diagnostics

jax (https://github.com/google/jax)
- jax/experimental/array_serialization/serialization_test.py:317:30: error[invalid-argument-type] Argument to bound method `submit` is incorrect: Expected `int`, found `float`
+ jax/experimental/array_serialization/serialization_test.py:317:38: error[invalid-argument-type] Argument to bound method `submit` is incorrect: Expected `int`, found `float`

@11happy
Copy link
Contributor Author

11happy commented Feb 6, 2026

Mypy-primer is failing because of this panic: https://github.com/astral-sh/ruff/actions/runs/21655910487/job/62430518631?pr=23036#step:6:1100

Seems likely to have been introduced by the changes in this PR.

If you are not sure what the cause is, you can clone jax and run ty on it and try to reproduce locally.

Thank you very much for pointing it , I was able to debug it, the issue was at call due to offset out of bounds error, even with my initial approach of max index check it was failing the core , at the call sites the synthetic args are not counted so I subtracted it accordingly & it passes now.

Thank you : )

@11happy 11happy requested a review from dhruvmanila February 7, 2026 01:39
@dhruvmanila dhruvmanila self-assigned this Feb 9, 2026
Signed-off-by: Bhuminjay <[email protected]>
@dhruvmanila dhruvmanila merged commit 4f7773d into astral-sh:main Feb 9, 2026
50 checks passed
carljm added a commit to Hugo-Polloli/ruff that referenced this pull request Feb 9, 2026
* main: (45 commits)
  [ty] Fix wrong inlay hints for overloaded function arguments (astral-sh#23179)
  [ty] Respect `@no_type_check` when combined with other decorators (astral-sh#23177)
  [ty] Use type context when inferring constructor argument types (astral-sh#23139)
  [`airflow`] Add ruff rules to catch deprecated attribute access from context key for Airflow 3.0 (`AIR301`) (astral-sh#22850)
  Support formatting `pycon` markdown code blocks (astral-sh#23112)
  Markdown formatting in LSP (astral-sh#23063)
  Instruct Claude to use comments more sparingly (astral-sh#23181)
  [`flake8-gettext`] Fix false negatives for plural argument of ngettext (`INT001`, `INT002`, `INT003`) (astral-sh#21078)
  [ty] Invoking goto-def on parentheses of a class constructor call takes you too constructor method
  [ty] Make goto definition on class constructor always go to class definition
  [ty] Assign lower completions ranking to deprecated functions and classes (astral-sh#23089)
  [ty] Fix parameter references across files via keyword args (astral-sh#23012)
  [ty] Exclude enclosing class for base completions (astral-sh#23141)
  [`pyupgrade`] Fix syntax error on string with newline escape and comment (`UP037`) (astral-sh#22968)
  [ty] Improve documentation for `expect_single_definition` method (astral-sh#23175)
  [ty] Configure check mode for all projects
  Add `home-assistant` to ecosystem projects (astral-sh#23132)
  Add tabbed shell completion documentation (astral-sh#23169)
  Bump typing conformance-suite pin (astral-sh#23174)
  [ty] Fix invalid diagnostic location for a sub-call to a specialized ParamSpec (astral-sh#23036)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diagnostics Related to reporting of diagnostics. ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants