Skip to content

[ty] Infer lambda parameter types with Callable type context#24317

Merged
ibraheemdev merged 2 commits intomainfrom
ibraheem/callable-tcx
Apr 23, 2026
Merged

[ty] Infer lambda parameter types with Callable type context#24317
ibraheemdev merged 2 commits intomainfrom
ibraheem/callable-tcx

Conversation

@ibraheemdev
Copy link
Copy Markdown
Member

@ibraheemdev ibraheemdev commented Mar 30, 2026

Improves #22633 to infer the use of lambda parameters in a lambda body with type context, e.g.,

x: Callable[[str], str] = lambda x: reveal_type(x)  # revealed: str
reveal_type(x)  # revealed: (x: str) -> str

Unlike other definitions, lambda parameter types cannot be determined purely syntactically in semantic indexing. Instead, they depend on the inferred type of the lambda to access its parameter types. Unfortunately, this makes lambda inference cyclic, as the body of the lambda depends on the outer lambda type, and there is no obvious way of splitting out inference of the lambda parameter types from its return type.

To avoid initiating cycles on the entire scope containing the lambda, this PR introduces a new inference query — statement-level inference. Statements are a minimal unit of code that encapsulate any internal type context. This makes them very useful to infer a given sub-expression "naturally" without having to provide any external type context. There are other places where we currently rely on scope-level inference for this purpose (e.g., see infer_complete_scope_types, the current implementation of #23761, and the discussion in astral-sh/ty#3124). Note that statement-level inference is not perfectly fine-grained, e.g., the test expression of an if statement does not require external type context and is independent from its body, so statement-level inference may lead to unnecessarily large cycles, but having the unit of code being generalized to an AST structure allows us to avoid the need for such special cases, but this can always change in the future.

Additionally, many statements are simply wrappers around definitions or standalone expressions, so we can avoid extra salsa allocations in the common case.

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

astral-sh-bot Bot commented Mar 30, 2026

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 87.94%. The percentage of expected errors that received a diagnostic held steady at 83.36%. The number of fully passing files held steady at 79/133.

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented Mar 30, 2026

Memory usage report

Summary

Project Old New Diff Outcome
prefect 704.14MB 708.87MB +0.67% (4.73MB)
sphinx 258.60MB 259.63MB +0.40% (1.02MB)
trio 116.46MB 116.89MB +0.37% (445.36kB)
flake8 47.68MB 47.89MB +0.43% (211.08kB)

Significant changes

Click to expand detailed breakdown

prefect

Name Old New Diff Outcome
Definition 21.07MB 22.99MB +9.09% (1.92MB)
infer_definition_types 90.12MB 91.15MB +1.14% (1.03MB)
infer_scope_types_impl 54.78MB 55.55MB +1.41% (789.92kB)
infer_expression_types_impl 62.86MB 63.25MB +0.61% (394.33kB)
infer_statement_types_impl 0.00B 222.00kB +222.00kB (new)
semantic_index 175.34MB 175.49MB +0.09% (158.87kB)
infer_expression_type_impl 13.41MB 13.56MB +1.12% (153.19kB)
infer_unpack_types 904.84kB 969.53kB +7.15% (64.69kB)
all_narrowing_constraints_for_expression 7.22MB 7.24MB +0.31% (23.23kB)
all_negative_narrowing_constraints_for_expression 2.63MB 2.65MB +0.44% (11.78kB)
StatementInner 0.00B 8.15kB +8.15kB (new)
CallableType 2.15MB 2.15MB +0.02% (432.00B)
StaticClassLiteral<'db>::implicit_attribute_inner_ 10.07MB 10.07MB +0.00% (368.00B)
function_known_decorators 8.26MB 8.26MB +0.00% (168.00B)
UnionType<'db>::from_two_elements_ 970.39kB 970.51kB +0.01% (116.00B)
... 6 more

sphinx

Name Old New Diff Outcome
Definition 8.14MB 8.88MB +9.09% (757.59kB)
infer_scope_types_impl 15.36MB 15.46MB +0.71% (111.59kB)
infer_definition_types 23.56MB 23.64MB +0.36% (86.48kB)
semantic_index 61.14MB 61.20MB +0.10% (61.88kB)
infer_statement_types_impl 0.00B 19.14kB +19.14kB (new)
infer_expression_types_impl 20.61MB 20.61MB +0.03% (6.02kB)
infer_expression_type_impl 2.90MB 2.90MB +0.12% (3.69kB)
StatementInner 0.00B 840.00B +840.00B (new)
CallableType 1.12MB 1.12MB +0.04% (504.00B)
Type<'db>::apply_specialization_ 1.63MB 1.63MB +0.03% (472.00B)
Type<'db>::apply_specialization_::interned_arguments 1.44MB 1.44MB +0.03% (400.00B)
Specialization 1003.84kB 1004.14kB +0.03% (304.00B)
all_narrowing_constraints_for_expression 2.34MB 2.34MB +0.00% (84.00B)
all_negative_narrowing_constraints_for_expression 1.00MB 1.00MB +0.01% (84.00B)
GenericAlias 418.01kB 418.08kB +0.02% (72.00B)
... 3 more

trio

Name Old New Diff Outcome
Definition 4.00MB 4.36MB +9.09% (372.36kB)
infer_statement_types_impl 0.00B 23.87kB +23.87kB (new)
semantic_index 30.00MB 30.02MB +0.07% (21.34kB)
infer_definition_types 7.55MB 7.57MB +0.21% (16.11kB)
infer_scope_types_impl 4.71MB 4.71MB +0.09% (4.46kB)
infer_expression_types_impl 6.98MB 6.99MB +0.04% (2.96kB)
infer_expression_type_impl 1.30MB 1.31MB +0.16% (2.14kB)
all_narrowing_constraints_for_expression 591.83kB 592.99kB +0.20% (1.16kB)
StatementInner 0.00B 952.00B +952.00B (new)
function_known_decorators 920.43kB 920.45kB +0.00% (24.00B)

flake8

Name Old New Diff Outcome
Definition 1.98MB 2.16MB +9.09% (184.17kB)
semantic_index 13.73MB 13.74MB +0.07% (9.20kB)
infer_statement_types_impl 0.00B 6.06kB +6.06kB (new)
infer_definition_types 1.86MB 1.86MB +0.28% (5.37kB)
infer_expression_types_impl 1.03MB 1.03MB +0.32% (3.41kB)
infer_scope_types_impl 983.70kB 986.41kB +0.28% (2.71kB)
StatementInner 0.00B 168.00B +168.00B (new)

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented Mar 30, 2026

ecosystem-analyzer results

Lint rule Added Removed Changed
invalid-argument-type 77 0 11
invalid-await 1 40 0
unresolved-attribute 32 0 2
unused-type-ignore-comment 2 15 0
unsupported-operator 14 0 0
not-subscriptable 13 0 0
invalid-assignment 4 2 4
invalid-return-type 0 6 0
not-iterable 1 0 4
missing-argument 1 0 0
unknown-argument 1 0 0
Total 146 63 21
Raw diff (230 changes)
Expression (https://github.com/cognitedata/Expression)
+ expression/extra/parser.py:160:56 error[invalid-argument-type] Argument is incorrect: Expected `Never`, found `Parser[_A@choice]`
- tests/test_result.py:535:26 error[invalid-argument-type] Argument to bound method `Result.or_else_with` is incorrect: Expected `(Literal["original error"], /) -> Result[Any, Literal["original error"]]`, found `(error: Literal["original error"]) -> Result[Any, str]`
+ tests/test_result.py:535:26 error[invalid-argument-type] Argument to bound method `Result.or_else_with` is incorrect: Expected `(Literal["original error"], /) -> Result[Any, Literal["original error"]]`, found `(error: Literal["original error"]) -> Result[Any, Literal["new error from original error"]]`

PyWinCtl (https://github.com/Kalmat/PyWinCtl)
- src/pywinctl/_main.py:831:49 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- src/pywinctl/_main.py:832:60 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- src/pywinctl/_main.py:833:56 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- src/pywinctl/_main.py:835:56 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- src/pywinctl/_main.py:836:67 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- src/pywinctl/_main.py:837:63 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- src/pywinctl/_main.py:838:57 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- src/pywinctl/_main.py:839:66 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- src/pywinctl/_main.py:840:71 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- src/pywinctl/_main.py:841:98 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive

attrs (https://github.com/python-attrs/attrs)
- tests/test_cmp.py:364:23 error[invalid-argument-type] Argument to function `cmp_using` is incorrect: Expected `((Any, Any, /) -> bool) | None`, found `(a: Any, b: Any) -> _NotImplementedType | (bool & Unknown)`
+ tests/test_cmp.py:364:23 error[invalid-argument-type] Argument to function `cmp_using` is incorrect: Expected `((Any, Any, /) -> bool) | None`, found `(a: Any, b: Any) -> _NotImplementedType | (bool & Any)`

cki-lib (https://gitlab.com/cki-project/cki-lib)
- cki_lib/owners.py:319:16 error[invalid-return-type] Return type does not match returned value: expected `None`, found `str`

core (https://github.com/home-assistant/core)
+ homeassistant/bootstrap.py:631:9 error[invalid-argument-type] Argument to bound method `Logger.exception` is incorrect: Expected `None | bool | tuple[type[BaseException], BaseException, TracebackType | None] | tuple[None, None, None] | BaseException`, found `tuple[type[BaseException], BaseException | None, TracebackType | None]`
+ homeassistant/components/fronius/sensor.py:611:36 error[invalid-argument-type] Argument to function `max` is incorrect: Argument type `str | int | float | None` does not satisfy upper bound `SupportsDunderLT[Any] | SupportsDunderGT[Any]` of type variable `SupportsRichComparisonT`
+ homeassistant/components/fronius/sensor.py:611:36 error[invalid-argument-type] Argument to function `max` is incorrect: Expected `Literal[0]`, found `StateType`
+ homeassistant/components/fronius/sensor.py:620:36 error[unsupported-operator] Operator `-` is not supported between objects of type `Literal[0]` and `StateType`
+ homeassistant/components/fronius/sensor.py:637:36 error[invalid-argument-type] Argument to function `max` is incorrect: Argument type `str | int | float | None` does not satisfy upper bound `SupportsDunderLT[Any] | SupportsDunderGT[Any]` of type variable `SupportsRichComparisonT`
+ homeassistant/components/fronius/sensor.py:637:36 error[invalid-argument-type] Argument to function `max` is incorrect: Expected `Literal[0]`, found `StateType`
+ homeassistant/components/fronius/sensor.py:646:36 error[unsupported-operator] Operator `-` is not supported between objects of type `Literal[0]` and `StateType`
+ homeassistant/components/fronius/sensor.py:663:36 error[invalid-argument-type] Argument to function `max` is incorrect: Argument type `str | int | float | None` does not satisfy upper bound `SupportsDunderLT[Any] | SupportsDunderGT[Any]` of type variable `SupportsRichComparisonT`
+ homeassistant/components/fronius/sensor.py:663:36 error[invalid-argument-type] Argument to function `max` is incorrect: Expected `Literal[0]`, found `StateType`
+ homeassistant/components/fronius/sensor.py:673:36 error[unsupported-operator] Operator `-` is not supported between objects of type `Literal[0]` and `StateType`
+ homeassistant/components/gardena_bluetooth/sensor.py:62:48 error[invalid-assignment] Object of type `(x: T@GardenaBluetoothSensorEntityDescription | None) -> T@GardenaBluetoothSensorEntityDescription | None` is not assignable to `(T@GardenaBluetoothSensorEntityDescription | None, /) -> SensorRawType`

dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ ddtrace/internal/settings/symbol_db.py:25:83 error[unresolved-attribute] Object of type `Env` has no attribute `includes`
+ tests/debugging/exploration/_config.py:81:19 error[unresolved-attribute] Object of type `Env` has no attribute `output_file`
+ tests/debugging/exploration/_config.py:81:46 error[unresolved-attribute] Object of type `Env` has no attribute `output_file`
+ tests/debugging/exploration/_config.py:87:28 error[unresolved-attribute] Object of type `Env` has no attribute `conservative`
+ tests/debugging/exploration/_config.py:89:26 error[unresolved-attribute] Object of type `Env` has no attribute `conservative`
+ tests/internal/bytecode_injection/framework_injection/_config.py:59:19 error[unresolved-attribute] Object of type `Env` has no attribute `output_file`
+ tests/internal/bytecode_injection/framework_injection/_config.py:59:46 error[unresolved-attribute] Object of type `Env` has no attribute `output_file`
+ ddtrace/internal/settings/dynamic_instrumentation.py:123:97 error[unresolved-attribute] Object of type `Env` has no attribute `redacted_types`
+ ddtrace/internal/settings/dynamic_instrumentation.py:124:12 error[unresolved-attribute] Object of type `Env` has no attribute `redacted_types`

egglog-python (https://github.com/egraphs-good/egglog-python)
- python/egglog/exp/array_api.py:2031:71 error[invalid-argument-type] Argument to bound method `NDArray.if_` is incorrect: Expected `() -> NDArray`, found `() -> Value | Unknown | Int`
+ python/egglog/exp/array_api.py:2031:71 error[invalid-argument-type] Argument to bound method `NDArray.if_` is incorrect: Expected `() -> NDArray`, found `() -> Value | Int | i64 | ... omitted 5 union elements`
+ python/egglog/exp/array_api.py:2031:79 error[invalid-argument-type] Method `__getitem__` of type `bound method Vec[Int].__getitem__(index: i64 | int) -> Int` cannot be called with key of type `Int` on object of type `Vec[Int]`
+ python/egglog/exp/array_api.py:2031:79 error[invalid-argument-type] Method `__getitem__` of type `bound method Vec[Value].__getitem__(index: i64 | int) -> Value` cannot be called with key of type `Int` on object of type `Vec[Value]`

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
- src/hydra_zen/wrapper/_implementations.py:1735:52 error[invalid-assignment] Object of type `((x: str | None) -> object) | (((str | None, /) -> str | None) & ~Top[Mapping[Unknown, object]])` is not assignable to `(str | None, /) -> str | None`
- src/hydra_zen/wrapper/_implementations.py:1736:59 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive

ignite (https://github.com/pytorch/ignite)
+ tests/ignite/handlers/test_checkpoint.py:272:92 error[unresolved-attribute] Object of type `State` has no attribute `score`
+ tests/ignite/handlers/test_checkpoint.py:348:89 error[unresolved-attribute] Object of type `State` has no attribute `score`

jax (https://github.com/google/jax)
- jax/_src/interpreters/mlir.py:1904:42 error[not-iterable] Object of type `WeakrefCachedFunc[(...), Unknown]` is not iterable
+ jax/_src/interpreters/mlir.py:1904:42 error[not-iterable] Object of type `WeakrefCachedFunc[(...), Any]` is not iterable
- jax/_src/interpreters/mlir.py:1907:37 error[invalid-argument-type] Argument to function `safe_zip` is incorrect: Expected `Iterable[Unknown]`, found `WeakrefCachedFunc[(...), Unknown]`
+ jax/_src/interpreters/mlir.py:1907:37 error[invalid-argument-type] Argument to function `safe_zip` is incorrect: Expected `Iterable[Unknown]`, found `WeakrefCachedFunc[(...), Any]`
- jax/_src/interpreters/mlir.py:2628:41 error[invalid-argument-type] Argument to function `unzip2` is incorrect: Expected `Iterable[tuple[Unknown, Unknown]]`, found `WeakrefCachedFunc[(...), Unknown]`
+ jax/_src/interpreters/mlir.py:2628:41 error[invalid-argument-type] Argument to function `unzip2` is incorrect: Expected `Iterable[tuple[Unknown, Unknown]]`, found `WeakrefCachedFunc[(...), Any]`
- jax/_src/interpreters/mlir.py:2630:38 error[not-iterable] Object of type `WeakrefCachedFunc[(...), Unknown]` is not iterable
+ jax/_src/interpreters/mlir.py:2630:38 error[not-iterable] Object of type `WeakrefCachedFunc[(...), Any]` is not iterable
- jax/_src/interpreters/pxla.py:862:7 error[invalid-argument-type] Argument to function `unzip2` is incorrect: Expected `Iterable[tuple[Unknown, Unknown]]`, found `WeakrefCachedFunc[(...), Unknown]`
+ jax/_src/interpreters/pxla.py:862:7 error[invalid-argument-type] Argument to function `unzip2` is incorrect: Expected `Iterable[tuple[Unknown, Unknown]]`, found `WeakrefCachedFunc[(...), Any]`
- jax/_src/lax/lax.py:1911:41 error[invalid-argument-type] Argument to function `unzip2` is incorrect: Expected `Iterable[tuple[Unknown, Unknown]]`, found `WeakrefCachedFunc[(...), Unknown]`
+ jax/_src/lax/lax.py:1911:41 error[invalid-argument-type] Argument to function `unzip2` is incorrect: Expected `Iterable[tuple[Unknown, Unknown]]`, found `WeakrefCachedFunc[(...), Any]`
- jax/_src/lax/lax.py:1914:22 error[not-iterable] Object of type `WeakrefCachedFunc[(...), Unknown]` is not iterable
+ jax/_src/lax/lax.py:1914:22 error[not-iterable] Object of type `WeakrefCachedFunc[(...), Any]` is not iterable
- jax/_src/pjit.py:1371:45 error[invalid-argument-type] Argument to function `unzip2` is incorrect: Expected `Iterable[tuple[Unknown, Unknown]]`, found `WeakrefCachedFunc[(...), Unknown]`
+ jax/_src/pjit.py:1371:45 error[invalid-argument-type] Argument to function `unzip2` is incorrect: Expected `Iterable[tuple[Unknown, Unknown]]`, found `WeakrefCachedFunc[(...), Any]`
- jax/_src/pjit.py:1385:22 error[not-iterable] Object of type `WeakrefCachedFunc[(...), Unknown]` is not iterable
+ jax/_src/pjit.py:1385:22 error[not-iterable] Object of type `WeakrefCachedFunc[(...), Any]` is not iterable

jinja (https://github.com/pallets/jinja)
+ examples/basic/translate.py:5:43 error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, str].__getitem__(key: str, /) -> str` cannot be called with key of type `int` on object of type `dict[str, str]`
+ tests/test_async.py:655:60 error[not-iterable] Object of type `int` is not iterable
+ tests/test_ext.py:291:44 error[unresolved-attribute] Object of type `int` has no attribute `upper`

meson (https://github.com/mesonbuild/meson)
+ mesonbuild/backend/ninjabackend.py:1949:81 error[unresolved-attribute] Attribute `startswith` is not defined on `None` in union `str | None`

mypy (https://github.com/python/mypy)
+ mypy/semanal.py:7188:50 error[invalid-argument-type] Argument to function `isinstance` is incorrect: Expected `type | UnionType | tuple[Divergent, ...]`, found `object`
+ mypy/semanal.py:7189:44 error[unresolved-attribute] Object of type `object` has no attribute `type`
+ mypy/semanal.py:7201:23 error[unresolved-attribute] Object of type `object` has no attribute `type`

optuna (https://github.com/optuna/optuna)
+ optuna/samplers/_tpe/_erf.py:117:72 error[invalid-assignment] Object of type `list[((ndarray[Unknown, dtype[Any]], /) -> ndarray[Unknown, dtype[Any]]) | ((x: ndarray[Unknown, dtype[Any]]) -> float64 | Any)]` is not assignable to `list[(ndarray[Unknown, dtype[Any]], /) -> ndarray[Unknown, dtype[Any]]]`
+ tests/visualization_tests/test_contour.py:523:26 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ tests/visualization_tests/test_edf.py:172:33 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ tests/visualization_tests/test_parallel_coordinate.py:780:33 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ tests/visualization_tests/test_param_importances.py:273:26 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ tests/visualization_tests/test_param_importances.py:295:26 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ tests/visualization_tests/test_pareto_front.py:333:13 error[invalid-argument-type] Argument to function `_get_pareto_front_info` is incorrect: Expected `((FrozenTrial, /) -> Sequence[int | float]) | None`, found `(t: FrozenTrial) -> int | float | Unknown`
+ tests/visualization_tests/test_pareto_front.py:333:31 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ tests/visualization_tests/test_pareto_front.py:351:32 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ tests/visualization_tests/test_pareto_front.py:351:45 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ tests/visualization_tests/test_pareto_front.py:351:58 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ tests/visualization_tests/test_rank.py:615:26 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ tests/visualization_tests/test_slice.py:403:26 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method

paasta (https://github.com/yelp/paasta)
- paasta_tools/setup_prometheus_adapter_config.py:983:12 error[invalid-return-type] Return type does not match returned value: expected `PrometheusAdapterConfig`, found `dict[str, list[PrometheusAdapterRule | UnspecializedTypeVar]]`

pandas (https://github.com/pandas-dev/pandas)
+ pandas/tests/extension/base/methods.py:445:48 error[unsupported-operator] Operator `<=` is not supported between two objects of type `Hashable`
+ pandas/tests/extension/base/methods.py:458:49 error[unsupported-operator] Operator `<=` is not supported between two objects of type `Hashable`
+ pandas/tests/extension/base/methods.py:494:47 error[unsupported-operator] Operator `+` is not supported between two objects of type `Hashable`
+ pandas/tests/extension/base/methods.py:498:48 error[unsupported-operator] Operator `+` is not supported between two objects of type `Hashable`
+ pandas/tests/extension/base/methods.py:502:49 error[unsupported-operator] Operator `+` is not supported between two objects of type `Hashable`
+ pandas/tests/series/methods/test_combine.py:12:46 error[unsupported-operator] Operator `+` is not supported between two objects of type `Hashable`
+ pandas/tests/series/methods/test_combine.py:16:51 error[invalid-argument-type] Argument to function `min` is incorrect: Argument type `Hashable` does not satisfy upper bound `SupportsDunderLT[Any] | SupportsDunderGT[Any]` of type variable `SupportsRichComparisonT`
+ pandas/tests/series/methods/test_combine.py:16:54 error[invalid-argument-type] Argument to function `min` is incorrect: Argument type `Hashable` does not satisfy upper bound `SupportsDunderLT[Any] | SupportsDunderGT[Any]` of type variable `SupportsRichComparisonT`
+ pandas/tests/series/methods/test_combine.py:24:44 error[unsupported-operator] Operator `+` is not supported between two objects of type `Hashable`
+ pandas/tests/series/methods/test_combine.py:35:46 error[unsupported-operator] Operator `+` is not supported between two objects of type `Hashable`
+ pandas/tests/extension/test_categorical.py:127:48 error[unsupported-operator] Operator `+` is not supported between two objects of type `Hashable`
+ pandas/tests/extension/test_categorical.py:134:49 error[unsupported-operator] Operator `+` is not supported between two objects of type `Hashable`
- pandas/tests/frame/methods/test_map.py:101:46 error[invalid-argument-type] Argument to bound method `DataFrame.map` is incorrect: Expected `(Any, /) -> Any`, found `(x: Any, y) -> Unknown`
+ pandas/tests/frame/methods/test_map.py:101:46 error[invalid-argument-type] Argument to bound method `DataFrame.map` is incorrect: Expected `(Any, /) -> Any`, found `(x: Any, y) -> Any`
- pandas/tseries/holiday.py:412:20 error[invalid-return-type] Return type does not match returned value: expected `DatetimeIndex`, found `Index`

prefect (https://github.com/PrefectHQ/prefect)
- src/integrations/prefect-docker/tests/test_containers.py:26:31 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_containers.py:41:26 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_containers.py:54:31 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_containers.py:67:31 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_containers.py:80:31 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-docker/tests/test_containers.py:27:47 error[invalid-argument-type] Argument is incorrect: Expected `bool | None`, found `str | bool | dict[str, int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str | bool | dict[str, int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, str] | list[str] | None`, found `str | bool | dict[str, int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47 error[invalid-argument-type] Argument is incorrect: Expected `str | None`, found `str | bool | dict[str, int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47 error[invalid-argument-type] Argument is incorrect: Expected `str | list[str] | None`, found `str | bool | dict[str, int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47 error[invalid-argument-type] Argument is incorrect: Expected `str`, found `str | bool | dict[str, int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:42:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
+ src/integrations/prefect-docker/tests/test_containers.py:55:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
+ src/integrations/prefect-docker/tests/test_containers.py:68:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
+ src/integrations/prefect-docker/tests/test_containers.py:81:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
- src/integrations/prefect-docker/tests/test_images.py:28:27 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_images.py:48:27 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_images.py:63:28 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-docker/tests/test_images.py:29:47 error[invalid-argument-type] Argument is incorrect: Expected `DockerRegistryCredentials | None`, found `str`
+ src/integrations/prefect-docker/tests/test_images.py:29:47 error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `str`
+ src/integrations/prefect-docker/tests/test_images.py:29:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
+ src/integrations/prefect-docker/tests/test_images.py:31:16 error[unresolved-attribute] Attribute `id` is not defined on `list[Unknown]` in union `Unknown | list[Unknown]`
+ src/integrations/prefect-docker/tests/test_images.py:51:17 error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `str`
+ src/integrations/prefect-docker/tests/test_images.py:51:17 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
+ src/integrations/prefect-docker/tests/test_images.py:53:16 error[unresolved-attribute] Attribute `id` is not defined on `list[Unknown]` in union `Unknown | list[Unknown]`
+ src/integrations/prefect-docker/tests/test_images.py:64:47 error[invalid-argument-type] Argument is incorrect: Expected `DockerRegistryCredentials | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:64:47 error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:64:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:64:47 error[invalid-argument-type] Argument is incorrect: Expected `str | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:64:47 error[invalid-argument-type] Argument is incorrect: Expected `str`, found `str | bool`
- src/integrations/prefect-docker/tests/test_images.py:16:23 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-docker/tests/test_images.py:16:44 error[invalid-argument-type] Argument is incorrect: Expected `DockerHost | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44 error[invalid-argument-type] Argument is incorrect: Expected `DockerRegistryCredentials | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44 error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44 error[invalid-argument-type] Argument is incorrect: Expected `str | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44 error[invalid-argument-type] Argument is incorrect: Expected `str`, found `str | bool`
- src/integrations/prefect-kubernetes/prefect_kubernetes/jobs.py:425:33 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-kubernetes/prefect_kubernetes/jobs.py:428:17 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:16:15 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:24:15 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:33:15 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:46:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:98:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:144:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:190:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:236:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:274:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:332:11 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:20:13 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `None`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:29:13 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `None`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:38:13 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `None`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:57:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:103:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:149:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:195:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:240:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:286:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:344:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
- src/integrations/prefect-kubernetes/tests/test_deployments.py:16:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_deployments.py:34:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_deployments.py:68:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_deployments.py:88:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_deployments.py:110:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_deployments.py:137:11 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:18:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:38:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:70:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:92:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:113:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:141:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
- src/integrations/prefect-kubernetes/tests/test_jobs.py:34:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:50:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:66:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:84:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:104:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:127:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:156:11 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:36:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:52:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:68:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:87:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:107:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:131:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:159:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
- src/integrations/prefect-kubernetes/tests/test_pods.py:27:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:42:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:76:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:92:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:112:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:133:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:163:11 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-kubernetes/tests/test_pods.py:29:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:46:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:78:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:96:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:115:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:137:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:167:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
- src/prefect/cache_policies.py:311:25 error[unresolved-attribute] Object of type `((...) -> Any) & ((*args: object, **kwargs: object) -> object)` has no attribute `__code__`
+ src/prefect/cache_policies.py:311:25 error[unresolved-attribute] Object of type `(...) -> Any` has no attribute `__code__`
+ src/prefect/cli/_transfer_utils.py:96:53 error[unresolved-attribute] Object of type `MigratableProtocol` has no attribute `source_work_pool`
+ src/prefect/cli/_transfer_utils.py:97:55 error[unresolved-attribute] Object of type `MigratableProtocol` has no attribute `source_work_queue`
+ src/prefect/cli/_transfer_utils.py:98:55 error[unresolved-attribute] Object of type `MigratableProtocol` has no attribute `source_deployment`
+ src/prefect/cli/_transfer_utils.py:99:43 error[unresolved-attribute] Object of type `MigratableProtocol` has no attribute `source_flow`
+ src/prefect/cli/_transfer_utils.py:102:41 error[unresolved-attribute] Object of type `MigratableProtocol` has no attribute `source_block_document`
+ src/prefect/cli/_transfer_utils.py:104:55 error[unresolved-attribute] Object of type `MigratableProtocol` has no attribute `source_block_type`
+ src/prefect/cli/_transfer_utils.py:107:43 error[unresolved-attribute] Object of type `MigratableProtocol` has no attribute `source_block_schema`
+ src/prefect/cli/_transfer_utils.py:109:51 error[unresolved-attribute] Object of type `MigratableProtocol` has no attribute `source_variable`
+ src/prefect/cli/_transfer_utils.py:110:55 error[unresolved-attribute] Object of type `MigratableProtocol` has no attribute `source_automation`
+ src/prefect/cli/_transfer_utils.py:113:44 error[unresolved-attribute] Object of type `MigratableProtocol` has no attribute `source_global_concurrency_limit`
+ src/prefect/task_engine.py:1642:28 error[invalid-await] `R@AsyncTaskRunEngine | Coroutine[Any, Any, R@AsyncTaskRunEngine]` is not awaitable
- src/prefect/tasks.py:2250:16 error[invalid-return-type] Return type does not match returned value: expected `MaterializingTask[P@MaterializingTask, R@MaterializingTask]`, found `MaterializingTask[(*args: object, **kwargs: object), object]`
- src/prefect/tasks.py:185:9 error[unresolved-attribute] Object of type `((...) -> Any) & ((*args: object, **kwargs: object) -> object)` has no attribute `__code__`
+ src/prefect/tasks.py:185:9 error[unresolved-attribute] Object of type `(...) -> Any` has no attribute `__code__`
- src/prefect/tasks.py:663:13 error[invalid-assignment] Object of type `Any & ~AlwaysFalsy` is not assignable to attribute `__prefect_self__` on type `((**P@Task) -> R@Task) & ((*args: object, **kwargs: object) -> object)`
+ src/prefect/tasks.py:663:13 error[unresolved-attribute] Unresolved attribute `__prefect_self__` on type `(**P@Task) -> R@Task`
- src/prefect/tasks.py:799:13 error[invalid-argument-type] Argument to `Task.__init__` is incorrect: Expected `(() -> str) | TaskRunNameCallbackWithParameters | str | None`, found `((() -> str) & ~<class 'NotSet'>) | TaskRunNameCallbackWithParameters | str | ... omitted 3 union elements`
+ src/prefect/tasks.py:799:13 error[invalid-argument-type] Argument to `Task.__init__` is incorrect: Expected `(() -> str) | TaskRunNameCallbackWithParameters | str | None`, found `(() -> str) | TaskRunNameCallbackWithParameters | str | (type[NotSet] & ~<class 'NotSet'>) | None`
- src/prefect/utilities/_engine.py:85:12 error[invalid-return-type] Return type does not match returned value: expected `str`, found `object`
- src/prefect/utilities/_engine.py:64:13 error[invalid-argument-type] Argument to bound method `TaskRunNameCallbackWithParameters.is_callback_with_parameters` is incorrect: Expected `(...) -> str`, found `(str & Top[(...) -> object]) | ((() -> str) & ((*args: object, **kwargs: object) -> object)) | (TaskRunNameCallbackWithParameters & ((*args: object, **kwargs: object) -> object))`
+ src/prefect/utilities/_engine.py:64:13 error[invalid-argument-type] Argument to bound method `TaskRunNameCallbackWithParameters.is_callback_with_parameters` is incorrect: Expected `(...) -> str`, found `(str & Top[(...) -> object]) | (() -> str) | TaskRunNameCallbackWithParameters`
+ src/prefect/utilities/_engine.py:66:48 error[unknown-argument] Argument `parameters` does not match any known parameter
+ src/prefect/utilities/_engine.py:69:29 error[missing-argument] No argument provided for required parameter `parameters` of bound method `TaskRunNameCallbackWithParameters.__call__`

pycryptodome (https://github.com/Legrandin/pycryptodome)
+ lib/Crypto/SelfTest/Protocol/test_KDF.py:141:52 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `bytes | bytearray | memoryview[int]`, found `int`

pydantic (https://github.com/pydantic/pydantic)
- pydantic/_internal/_mock_val_ser.py:137:5 error[invalid-assignment] Object of type `MockValSer[Unknown]` is not assignable to attribute `validator` of type `SchemaValidator | PluggableSchemaValidator`
+ pydantic/_internal/_mock_val_ser.py:137:5 error[invalid-assignment] Object of type `MockValSer[SchemaValidator | PluggableSchemaValidator]` is not assignable to attribute `validator` of type `SchemaValidator | PluggableSchemaValidator`
- pydantic/_internal/_mock_val_ser.py:143:5 error[invalid-assignment] Object of type `MockValSer[Unknown]` is not assignable to attribute `serializer` of type `SchemaSerializer`
+ pydantic/_internal/_mock_val_ser.py:143:5 error[invalid-assignment] Object of type `MockValSer[SchemaSerializer]` is not assignable to attribute `serializer` of type `SchemaSerializer`
- pydantic/_internal/_mock_val_ser.py:178:5 error[invalid-assignment] Object of type `MockValSer[Unknown]` is not assignable to attribute `__pydantic_validator__` of type `SchemaValidator | PluggableSchemaValidator`
+ pydantic/_internal/_mock_val_ser.py:178:5 error[invalid-assignment] Object of type `MockValSer[SchemaValidator | PluggableSchemaValidator]` is not assignable to attribute `__pydantic_validator__` of type `SchemaValidator | PluggableSchemaValidator`
- pydantic/_internal/_mock_val_ser.py:184:5 error[invalid-assignment] Object of type `MockValSer[Unknown]` is not assignable to attribute `__pydantic_serializer__` of type `SchemaSerializer`
+ pydantic/_internal/_mock_val_ser.py:184:5 error[invalid-assignment] Object of type `MockValSer[SchemaSerializer]` is not assignable to attribute `__pydantic_serializer__` of type `SchemaSerializer`
+ pydantic/main.py:110:81 error[invalid-assignment] Object of type `dict[str, ((model: BaseModel, name: str, val: Any) -> None) | ((model: BaseModel, name: str, val: Any) -> dict[str, Any] | tuple[dict[str, Any], dict[str, Any] | None, set[str]] | Any)]` is not assignable to `Mapping[str, (BaseModel, str, Any, /) -> None]`

rotki (https://github.com/rotki/rotki)
+ rotkehlchen/chain/evm/node_inquirer.py:1395:21 error[invalid-argument-type] Argument to bound method `EtherscanLikeApi.get_l1_fee` is incorrect: Expected `Literal[ChainID.OPTIMISM, ChainID.BASE, ChainID.SCROLL]`, found `Literal[ChainID.ETHEREUM, ChainID.OPTIMISM, ChainID.POLYGON_POS, ChainID.ARBITRUM_ONE, ChainID.BASE, ... omitted 5 literals]`

schema_salad (https://github.com/common-workflow-language/schema_salad)
+ schema_salad/dlang_codegen.py:440:50 error[unsupported-operator] Operator `&` is not supported between two objects of type `Sized`

static-frame (https://github.com/static-frame/static-frame)
- static_frame/test/unit/test_series.py:2682:65 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- static_frame/test/unit/test_store_zip.py:187:61 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ static_frame/test/unit/test_yarn.py:1676:53 error[unresolved-attribute] Attribute `size` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_yarn.py:1691:41 error[unresolved-attribute] Attribute `size` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_yarn.py:1696:37 error[unresolved-attribute] Attribute `size` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_yarn.py:1712:53 error[unresolved-attribute] Attribute `size` is not defined on `tuple[Any, Any]` in union `@Todo | tuple[Any, Any]`

streamlit (https://github.com/streamlit/streamlit)
+ lib/streamlit/watcher/local_sources_watcher.py:259:72 error[invalid-assignment] Object of type `list[((ModuleType, /) -> list[str | None]) | ((m: ModuleType) -> list[Never] | list[str | None])]` is not assignable to `list[(ModuleType, /) -> list[str | None]]`
+ lib/streamlit/watcher/local_sources_watcher.py:284:18 error[invalid-argument-type] Argument to `list.__init__` is incorrect: Expected `Iterable[str | None]`, found `object`

sympy (https://github.com/sympy/sympy)
+ sympy/core/basic.py:787:33 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- sympy/matrices/matrixbase.py:2644:72 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- sympy/matrices/matrixbase.py:2736:71 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ sympy/plotting/plot.py:104:28 error[not-subscriptable] Cannot subscript object of type `Basic` with no `__getitem__` method
+ sympy/plotting/plot.py:104:52 error[not-subscriptable] Cannot subscript object of type `Basic` with no `__getitem__` method
+ sympy/tensor/array/array_derivatives.py:52:52 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive

vision (https://github.com/pytorch/vision)
+ test/builtin_dataset_mocks.py:644:21 error[invalid-argument-type] Argument to function `create_image_folder` is incorrect: Expected `(int, /) -> str`, found `(idx: int) -> str | int | Unknown`
+ test/builtin_dataset_mocks.py:646:21 error[invalid-argument-type] Argument to function `create_image_folder` is incorrect: Expected `Sequence[int] | int | ((int, /) -> Sequence[int] | int) | None`, found `(idx: int) -> tuple[Literal[3], str | int | Unknown, str | int | Unknown]`

zulip (https://github.com/zulip/zulip)
- zerver/lib/display_recipient.py:77:12 error[invalid-return-type] Return type does not match returned value: expected `dict[int, UserDisplayRecipient]`, found `dict[int, dict[str, Any] | UserDisplayRecipient]`

Full report with detailed diff (timing results)

@ibraheemdev ibraheemdev force-pushed the ibraheem/callable-tcx branch 2 times, most recently from 2583e1a to 7eda4ee Compare March 30, 2026 21:14
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Mar 30, 2026

Merging this PR will not alter performance

✅ 53 untouched benchmarks
⏩ 60 skipped benchmarks1


Comparing ibraheem/callable-tcx (3aaf9ed) with main (4f449ae)

Open in CodSpeed

Footnotes

  1. 60 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 ibraheemdev force-pushed the ibraheem/callable-tcx branch 2 times, most recently from 0026c70 to 8804a2c Compare April 1, 2026 23:48
@ibraheemdev ibraheemdev force-pushed the ibraheem/callable-tcx branch 6 times, most recently from 37b6769 to 3b5d296 Compare April 8, 2026 21:01
@ibraheemdev ibraheemdev marked this pull request as ready for review April 8, 2026 21:02
@ibraheemdev
Copy link
Copy Markdown
Member Author

ibraheemdev commented Apr 8, 2026

I haven't looked too closely at the ecosystem report but those diagnostics look expected, as this PR increases our type inference coverage quite significantly where we would previously infer Unknown.

@ibraheemdev ibraheemdev force-pushed the ibraheem/callable-tcx branch 4 times, most recently from d846470 to 61ab8ef Compare April 18, 2026 06:28
Copy link
Copy Markdown
Member

@dcreager dcreager left a comment

Choose a reason for hiding this comment

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

Awesome! 👍 to the new statement-level inference region

Comment thread crates/ty_python_core/src/builder.rs Outdated
}
}
ast::Expr::Lambda(lambda) => {
if let Some(current_statement) = self.current_statement_mut() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are there places where we could encounter a lambda that's not in some statement?

use rustc_hash::{FxHashMap, FxHashSet};
use salsa;
use salsa::plumbing::AsId;
use ty_python_core::statement::StatementInner;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

very nit: should this be down in the next section, near the other ty_python_core imports?

@ibraheemdev ibraheemdev force-pushed the ibraheem/callable-tcx branch 2 times, most recently from fb4c442 to 959bd84 Compare April 23, 2026 16:05
@ibraheemdev ibraheemdev force-pushed the ibraheem/callable-tcx branch from 959bd84 to 3aaf9ed Compare April 23, 2026 19:30
@ibraheemdev ibraheemdev merged commit 43b174c into main Apr 23, 2026
56 checks passed
@ibraheemdev ibraheemdev deleted the ibraheem/callable-tcx branch April 23, 2026 20:06
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