Skip to content

[ty] Infer lambda return types from body expressions#23328

Closed
alex wants to merge 1 commit intoastral-sh:mainfrom
alex:claude/infer-lambda-return-types-1uGZd
Closed

[ty] Infer lambda return types from body expressions#23328
alex wants to merge 1 commit intoastral-sh:mainfrom
alex:claude/infer-lambda-return-types-1uGZd

Conversation

@alex
Copy link
Copy Markdown
Contributor

@alex alex commented Feb 16, 2026

Infer the return type of lambda expressions from their body expression, rather than always using Unknown.

This can introduce new Salsa cycles when a lambda body references a name involved in a circular definition. Added cycle recovery guards to prevent panics from non-converging cycles, though I'm not confident this is the correct solution.

Infer the return type of lambda expressions from their body expression,
rather than always using `Unknown`.

This can introduce new Salsa cycles when a lambda body references a name
involved in a circular definition. Added cycle recovery guards to prevent
panics from non-converging cycles, though I'm not confident this is the
correct solution.

https://claude.ai/code/session_014XYWYmMYnqZdVjBQCs5XCd
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Feb 16, 2026

Typing conformance results

No changes detected ✅

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Feb 16, 2026

mypy_primer results

Changes were detected when running on open source projects
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, b) -> _NotImplementedType | (bool & Unknown)`
- tests/test_validators.py:228:32: error[invalid-argument-type] Argument to function `matches_re` is incorrect: Expected `((str, str, int, /) -> Match[str] | None) | None`, found `() -> Unknown`
+ tests/test_validators.py:228:32: error[invalid-argument-type] Argument to function `matches_re` is incorrect: Expected `((str, str, int, /) -> Match[str] | None) | None`, found `() -> None`
- tests/test_validators.py:448:52: error[invalid-argument-type] Argument to function `include` is incorrect: Expected `type | str | Attribute[Any]`, found `(val) -> Unknown`
+ tests/test_validators.py:448:52: error[invalid-argument-type] Argument to function `include` is incorrect: Expected `type | str | Attribute[Any]`, found `(val) -> Literal[True]`
- tests/test_validators.py:449:52: error[invalid-argument-type] Argument to function `exclude` is incorrect: Expected `type | str | Attribute[Any]`, found `(val) -> Unknown`
+ tests/test_validators.py:449:52: error[invalid-argument-type] Argument to function `exclude` is incorrect: Expected `type | str | Attribute[Any]`, found `(val) -> Literal[True]`
- Found 639 diagnostics
+ Found 640 diagnostics

anyio (https://github.com/agronholm/anyio)
+ src/anyio/_core/_tempfile.py:108:9: error[invalid-assignment] Object of type `AsyncFile[str]` is not assignable to attribute `_async_file` of type `AsyncFile[AnyStr@TemporaryFile]`
- Found 90 diagnostics
+ Found 91 diagnostics

spack (https://github.com/spack/spack)
- lib/spack/spack/detection/path.py:169:33: error[invalid-argument-type] Argument to function `dedupe_paths` is incorrect: Expected `list[str]`, found `Unknown | list[str | PathLike[str] | PathLike[bytes] | ... omitted 3 union elements]`
+ lib/spack/spack/detection/path.py:169:33: error[invalid-argument-type] Argument to function `dedupe_paths` is incorrect: Expected `list[str]`, found `Unknown | list[int | PathLike[str] | PathLike[bytes] | ... omitted 3 union elements]`
- lib/spack/spack/llnl/util/filesystem.py:1668:35: error[invalid-argument-type] Argument to function `exists` is incorrect: Expected `int | str | bytes | PathLike[str] | PathLike[bytes]`, found `Sized | Unknown`
+ lib/spack/spack/llnl/util/filesystem.py:1668:35: error[invalid-argument-type] Argument to function `exists` is incorrect: Expected `int | str | bytes | PathLike[str] | PathLike[bytes]`, found `Unknown | Sized`
- lib/spack/spack/llnl/util/filesystem.py:1674:25: error[invalid-argument-type] Argument to function `move` is incorrect: Expected `str | PathLike[str]`, found `Sized | Unknown`
+ lib/spack/spack/llnl/util/filesystem.py:1674:25: error[invalid-argument-type] Argument to function `move` is incorrect: Expected `str | PathLike[str]`, found `Unknown | Sized`
- lib/spack/spack/spec.py:4051:60: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `defaultdict[Unknown, Unknown] | None`
+ lib/spack/spack/spec.py:4051:60: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `defaultdict[Unknown, int] | None`
- lib/spack/spack/test/llnl/util/lock.py:1102:40: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(() -> bool) | None | ContextManager[Unknown]`, found `def write(t, v, tb) -> Unknown`
- lib/spack/spack/test/llnl/util/lock.py:1108:36: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(() -> bool) | None | ContextManager[Unknown]`, found `def write(t, v, tb) -> Unknown`
- lib/spack/spack/test/llnl/util/lock.py:1112:44: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(() -> bool) | None | ContextManager[Unknown]`, found `def write(t, v, tb) -> Unknown`
- lib/spack/spack/test/llnl/util/lock.py:1121:40: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(() -> bool) | None | ContextManager[Unknown]`, found `def write(t, v, tb) -> Unknown`
- lib/spack/spack/test/llnl/util/lock.py:1125:48: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(() -> bool) | None | ContextManager[Unknown]`, found `def write(t, v, tb) -> Unknown`
- lib/spack/spack/util/file_cache.py:159:76: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- lib/spack/spack/util/file_cache.py:175:77: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- lib/spack/spack/verify_libraries.py:164:46: error[invalid-argument-type] Argument to function `candidate_matches` is incorrect: Expected `bytes`, found `bytes | Unknown | str | PathLike[str] | PathLike[bytes]`
+ lib/spack/spack/verify_libraries.py:164:46: error[invalid-argument-type] Argument to function `candidate_matches` is incorrect: Expected `bytes`, found `Unknown | bytes | str | PathLike[str] | PathLike[bytes]`
- lib/spack/spack/verify_libraries.py:165:17: error[invalid-assignment] Invalid subscript assignment with key of type `bytes | Unknown | str | PathLike[str] | PathLike[bytes]` and value of type `bytes | Unknown | str | PathLike[str] | PathLike[bytes]` on object of type `dict[bytes, bytes]`
+ lib/spack/spack/verify_libraries.py:165:17: error[invalid-assignment] Invalid subscript assignment with key of type `Unknown | bytes | str | PathLike[str] | PathLike[bytes]` and value of type `Unknown | bytes | str | PathLike[str] | PathLike[bytes]` on object of type `dict[bytes, bytes]`
- lib/spack/spack/verify_libraries.py:170:57: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[bytes]`, found `list[bytes | Unknown | str | PathLike[str] | PathLike[bytes]]`
+ lib/spack/spack/verify_libraries.py:170:57: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[bytes]`, found `list[Unknown | bytes | str | PathLike[str] | PathLike[bytes]]`
- lib/spack/spack/verify_libraries.py:170:69: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[bytes]`, found `list[bytes | Unknown | str | PathLike[str] | PathLike[bytes]]`
+ lib/spack/spack/verify_libraries.py:170:69: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[bytes]`, found `list[Unknown | bytes | str | PathLike[str] | PathLike[bytes]]`
- Found 4382 diagnostics
+ Found 4375 diagnostics

asynq (https://github.com/quora/asynq)
- asynq/tests/test_futures.py:22:5: error[unresolved-attribute] Object of type `Future[Unknown]` has no attribute `on_computed`
+ asynq/tests/test_futures.py:22:5: error[unresolved-attribute] Object of type `Future[int]` has no attribute `on_computed`
- asynq/tests/test_futures.py:25:5: error[unresolved-attribute] Object of type `Future[Unknown]` has no attribute `on_computed`
+ asynq/tests/test_futures.py:25:5: error[unresolved-attribute] Object of type `Future[int]` has no attribute `on_computed`

pip (https://github.com/pypa/pip)
- src/pip/_internal/req/req_uninstall.py:132:42: error[invalid-argument-type] Argument to function `norm_join` is incorrect: Expected `str`, found `Unknown | Sized`
+ src/pip/_internal/req/req_uninstall.py:132:42: error[invalid-argument-type] Argument to function `norm_join` is incorrect: Expected `str`, found `Sized | Unknown`
- src/pip/_internal/req/req_uninstall.py:133:40: error[invalid-argument-type] Argument to function `norm_join` is incorrect: Expected `str`, found `Unknown | Sized`
+ src/pip/_internal/req/req_uninstall.py:133:40: error[invalid-argument-type] Argument to function `norm_join` is incorrect: Expected `str`, found `Sized | Unknown`
- src/pip/_internal/req/req_uninstall.py:139:27: error[unsupported-operator] Operator `+` is not supported between objects of type `Unknown | Sized` and `LiteralString`
+ src/pip/_internal/req/req_uninstall.py:139:27: error[unsupported-operator] Operator `+` is not supported between objects of type `Sized | Unknown` and `LiteralString`

werkzeug (https://github.com/pallets/werkzeug)
- tests/live_apps/run.py:35:5: error[invalid-assignment] Object of type `(_) -> Unknown` is not assignable to attribute `address_string` of type `def address_string(self) -> str`
+ tests/live_apps/run.py:35:5: error[invalid-assignment] Object of type `(_) -> Any` is not assignable to attribute `address_string` of type `def address_string(self) -> str`

pytest (https://github.com/pytest-dev/pytest)
+ testing/_py/test_local.py:918:35: error[invalid-argument-type] Argument to bound method `sysfind` is incorrect: Expected `((local, /) -> bool) | None`, found `(x) -> None`
- Found 390 diagnostics
+ Found 391 diagnostics

sockeye (https://github.com/awslabs/sockeye)
+ sockeye_contrib/plot_metrics.py:24:1: error[no-matching-overload] No overload of bound method `update` matches arguments
- Found 416 diagnostics
+ Found 417 diagnostics

httpx-caching (https://github.com/johtso/httpx-caching)
+ httpx_caching/_utils.py:47:19: error[invalid-await] `Unknown | None` is not awaitable
- Found 27 diagnostics
+ Found 28 diagnostics

ignite (https://github.com/pytorch/ignite)
- tests/ignite/engine/test_engine.py:60:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(Engine, Any, /) -> Any`, found `() -> Unknown`
+ tests/ignite/engine/test_engine.py:60:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(Engine, Any, /) -> Any`, found `() -> None`
- tests/ignite/engine/test_engine.py:63:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(Engine, Any, /) -> Any`, found `(batch) -> Unknown`
+ tests/ignite/engine/test_engine.py:63:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(Engine, Any, /) -> Any`, found `(batch) -> None`
- tests/ignite/engine/test_engine.py:66:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(Engine, Any, /) -> Any`, found `(engine, batch, extra_arg) -> Unknown`
+ tests/ignite/engine/test_engine.py:66:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(Engine, Any, /) -> Any`, found `(engine, batch, extra_arg) -> None`
+ tests/ignite/handlers/test_checkpoint.py:102:53: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `((Engine, /) -> int | float) | None`, found `(e) -> dict[Unknown | str, Unknown | int]`
- Found 2140 diagnostics
+ Found 2141 diagnostics

rich (https://github.com/Textualize/rich)
- tests/test_console.py:367:29: error[invalid-argument-type] Argument to bound method `render` is incorrect: Expected `ConsoleRenderable | RichCast | str`, found `list[Unknown]`
+ tests/test_console.py:367:29: error[invalid-argument-type] Argument to bound method `render` is incorrect: Expected `RichCast | ConsoleRenderable | str`, found `list[Unknown]`
- tests/test_measure.py:19:51: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `ConsoleRenderable | RichCast | str`, found `None`
+ tests/test_measure.py:19:51: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `RichCast | ConsoleRenderable | str`, found `None`
- tests/test_table.py:102:23: error[invalid-argument-type] Argument to bound method `add_row` is incorrect: Expected `ConsoleRenderable | RichCast | str | None`, found `Foo`
+ tests/test_table.py:102:23: error[invalid-argument-type] Argument to bound method `add_row` is incorrect: Expected `RichCast | ConsoleRenderable | str | None`, found `Foo`
- tests/test_tools.py:17:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`
+ tests/test_tools.py:17:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`
- tests/test_tools.py:18:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`
+ tests/test_tools.py:18:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`
- tests/test_tools.py:19:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`
+ tests/test_tools.py:19:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`
- tests/test_tools.py:20:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`
+ tests/test_tools.py:20:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`

PyGithub (https://github.com/PyGithub/PyGithub)
- github/Requester.py:899:57: error[invalid-argument-type] Argument to bound method `__hostnameHasDomain` is incorrect: Expected `str | list[str]`, found `Unknown | list[Unknown | str] | list[str | Unknown | None]`
+ github/Requester.py:899:57: error[invalid-argument-type] Argument to bound method `__hostnameHasDomain` is incorrect: Expected `str | list[str]`, found `Unknown | list[Unknown | str] | list[None | Unknown | str]`

pydantic (https://github.com/pydantic/pydantic)
- pydantic/_internal/_core_metadata.py:87:54: error[invalid-assignment] Invalid assignment to key "pydantic_js_extra" with declared type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | ((dict[str, int | float | str | ... omitted 3 union elements], type[Any], /) -> None)` on TypedDict `CoreMetadata`: value of type `dict[object, object]`
+ pydantic/_internal/_core_metadata.py:87:54: error[invalid-assignment] Invalid assignment to key "pydantic_js_extra" with declared type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | ((dict[str, Divergent], type[Any], /) -> None)` on TypedDict `CoreMetadata`: value of type `dict[object, object]`
- pydantic/fields.py:949:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
+ pydantic/fields.py:949:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
- pydantic/fields.py:989:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
+ pydantic/fields.py:989:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
- pydantic/fields.py:1032:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
+ pydantic/fields.py:1032:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
- pydantic/fields.py:1072:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
+ pydantic/fields.py:1072:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
- pydantic/fields.py:1115:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
+ pydantic/fields.py:1115:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
- pydantic/fields.py:1154:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
+ pydantic/fields.py:1154:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
- pydantic/fields.py:1194:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
+ pydantic/fields.py:1194:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
- pydantic/fields.py:1573:13: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`, found `Top[dict[Unknown, Unknown]] | (((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) & ~Top[dict[Unknown, Unknown]]) | None`
+ pydantic/fields.py:1573:13: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`, found `Top[dict[Unknown, Unknown]] | (((dict[str, Divergent], /) -> None) & ~Top[dict[Unknown, Unknown]]) | None`

schemathesis (https://github.com/schemathesis/schemathesis)
+ src/schemathesis/cli/commands/run/handlers/output.py:830:70: error[invalid-assignment] Object of type `dataclasses.Field[dict[Unknown, tuple[Status, None]]]` is not assignable to `dict[PhaseName, tuple[Status, PhaseSkipReason | None]]`
+ src/schemathesis/specs/openapi/adapter/parameters.py:998:48: error[invalid-argument-type] Argument to bound method `filter` is incorrect: Expected `(GeneratedValue, /) -> Any`, found `Unknown | ((parameters: dict[str, object]) -> bool) | ((headers: dict[str, object]) -> bool) | ((query: dict[str, object]) -> bool)`
+ src/schemathesis/specs/openapi/adapter/parameters.py:1010:45: error[invalid-argument-type] Argument to bound method `map` is incorrect: Expected `(GeneratedValue, /) -> Unknown`, found `def quote_all(parameters: dict[str, Any]) -> dict[str, Any]`
+ src/schemathesis/specs/openapi/adapter/parameters.py:1015:45: error[invalid-argument-type] Argument to bound method `map` is incorrect: Expected `(GeneratedValue, /) -> Unknown`, found `def jsonify_python_specific_types(value: dict[str, Any]) -> dict[str, Any]`
- Found 318 diagnostics
+ Found 322 diagnostics

vision (https://github.com/pytorch/vision)
+ references/depth/stereo/transforms.py:124:16: error[invalid-return-type] Return type does not match returned value: expected `tuple[tuple[Unknown, Unknown], tuple[Unknown | ndarray[tuple[Any, ...], dtype[Any]] | None, Unknown | ndarray[tuple[Any, ...], dtype[Any]] | None], tuple[Unknown | ndarray[tuple[Any, ...], dtype[Any]] | None, Unknown | ndarray[tuple[Any, ...], dtype[Any]] | None]]`, found `tuple[tuple[Unknown, ...], tuple[None | Unknown, ...], tuple[None | Unknown, ...]]`
- Found 1438 diagnostics
+ Found 1439 diagnostics

urllib3 (https://github.com/urllib3/urllib3)
- test/contrib/emscripten/test_emscripten.py:387:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `is_cross_origin_isolated` of type `def is_cross_origin_isolated() -> bool`
+ test/contrib/emscripten/test_emscripten.py:387:9: error[invalid-assignment] Object of type `() -> Literal[False]` is not assignable to attribute `is_cross_origin_isolated` of type `def is_cross_origin_isolated() -> bool`

optuna (https://github.com/optuna/optuna)
- tests/study_tests/test_optimize.py:73:82: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/study_tests/test_optimize.py:78:86: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/visualization_tests/test_utils.py:177:71: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 573 diagnostics
+ Found 570 diagnostics

tornado (https://github.com/tornadoweb/tornado)
- tornado/test/escape_test.py:217:51: error[invalid-argument-type] Argument to function `linkify` is incorrect: Expected `bool`, found `Unknown | list[Unknown | str] | bool | str | ((href) -> Unknown)`
+ tornado/test/escape_test.py:217:51: error[invalid-argument-type] Argument to function `linkify` is incorrect: Expected `bool`, found `Unknown | list[Unknown | str] | bool | str | ((href) -> str)`
- tornado/test/escape_test.py:217:51: error[invalid-argument-type] Argument to function `linkify` is incorrect: Expected `str | ((str, /) -> str)`, found `Unknown | list[Unknown | str] | bool | str | ((href) -> Unknown)`
+ tornado/test/escape_test.py:217:51: error[invalid-argument-type] Argument to function `linkify` is incorrect: Expected `str | ((str, /) -> str)`, found `Unknown | list[Unknown | str] | bool | str | ((href) -> str)`
- tornado/test/escape_test.py:217:51: error[invalid-argument-type] Argument to function `linkify` is incorrect: Expected `bool`, found `Unknown | list[Unknown | str] | bool | str | ((href) -> Unknown)`
+ tornado/test/escape_test.py:217:51: error[invalid-argument-type] Argument to function `linkify` is incorrect: Expected `bool`, found `Unknown | list[Unknown | str] | bool | str | ((href) -> str)`
- tornado/test/escape_test.py:217:51: error[invalid-argument-type] Argument to function `linkify` is incorrect: Expected `list[str]`, found `Unknown | list[Unknown | str] | bool | str | ((href) -> Unknown)`
+ tornado/test/escape_test.py:217:51: error[invalid-argument-type] Argument to function `linkify` is incorrect: Expected `list[str]`, found `Unknown | list[Unknown | str] | bool | str | ((href) -> str)`

Expression (https://github.com/cognitedata/Expression)
+ tests/test_result.py:315:46: error[invalid-argument-type] Argument to bound method `filter_with` is incorrect: Expected `(Any, /) -> Literal["original error"]`, found `(value) -> str`
+ tests/test_result.py:517:26: error[invalid-argument-type] Argument to bound method `or_else_with` is incorrect: Expected `(Any, /) -> Result[Literal["good"], Any]`, found `(error) -> Result[str, Any]`
+ tests/test_result.py:523:26: error[invalid-argument-type] Argument to bound method `or_else_with` is incorrect: Expected `(Any, /) -> Result[Literal["good"], Any]`, found `(error) -> Result[str, Any]`
+ tests/test_result.py:535:26: error[invalid-argument-type] Argument to bound method `or_else_with` is incorrect: Expected `(Literal["original error"], /) -> Result[Any, Literal["original error"]]`, found `(error) -> Result[Any, str]`
- Found 204 diagnostics
+ Found 208 diagnostics

discord.py (https://github.com/Rapptz/discord.py)
- discord/enums.py:97:5: error[invalid-assignment] Object of type `(self) -> Unknown` is not assignable to attribute `__repr__` of type `def __repr__(self) -> str`
+ discord/enums.py:97:5: error[invalid-assignment] Object of type `(self) -> str` is not assignable to attribute `__repr__` of type `def __repr__(self) -> str`
- discord/enums.py:98:5: error[invalid-assignment] Object of type `(self) -> Unknown` is not assignable to attribute `__str__` of type `def __str__(self) -> str`
+ discord/enums.py:98:5: error[invalid-assignment] Object of type `(self) -> str` is not assignable to attribute `__str__` of type `def __str__(self) -> str`
- discord/enums.py:100:9: error[invalid-assignment] Object of type `(self, other) -> Unknown` is not assignable to attribute `__le__` of type `def __le__(self, value: tuple[Unknown, ...], /) -> bool`
+ discord/enums.py:100:9: error[invalid-assignment] Object of type `(self, other) -> Literal[False] | Unknown` is not assignable to attribute `__le__` of type `def __le__(self, value: tuple[Unknown, ...], /) -> bool`
- discord/enums.py:101:9: error[invalid-assignment] Object of type `(self, other) -> Unknown` is not assignable to attribute `__ge__` of type `def __ge__(self, value: tuple[Unknown, ...], /) -> bool`
+ discord/enums.py:101:9: error[invalid-assignment] Object of type `(self, other) -> Literal[False] | Unknown` is not assignable to attribute `__ge__` of type `def __ge__(self, value: tuple[Unknown, ...], /) -> bool`
- discord/enums.py:102:9: error[invalid-assignment] Object of type `(self, other) -> Unknown` is not assignable to attribute `__lt__` of type `def __lt__(self, value: tuple[Unknown, ...], /) -> bool`
+ discord/enums.py:102:9: error[invalid-assignment] Object of type `(self, other) -> Literal[False] | Unknown` is not assignable to attribute `__lt__` of type `def __lt__(self, value: tuple[Unknown, ...], /) -> bool`
- discord/enums.py:103:9: error[invalid-assignment] Object of type `(self, other) -> Unknown` is not assignable to attribute `__gt__` of type `def __gt__(self, value: tuple[Unknown, ...], /) -> bool`
+ discord/enums.py:103:9: error[invalid-assignment] Object of type `(self, other) -> Literal[False] | Unknown` is not assignable to attribute `__gt__` of type `def __gt__(self, value: tuple[Unknown, ...], /) -> bool`
- discord/file.py:106:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `close` of type `def close(self) -> None`
+ discord/file.py:106:9: error[invalid-assignment] Object of type `() -> None` is not assignable to attribute `close` of type `def close(self) -> None`

cloud-init (https://github.com/canonical/cloud-init)
+ cloudinit/cmd/main.py:958:38: error[unresolved-attribute] Attribute `export_logs` is not defined on `Handler` in union `Handler | Unknown`
+ cloudinit/cmd/main.py:999:34: error[unresolved-attribute] Attribute `export_logs` is not defined on `Handler` in union `Handler | Unknown`
+ cloudinit/cmd/main.py:1000:9: error[unresolved-attribute] Attribute `clean_logs` is not defined on `Handler` in union `Handler | Unknown`
- tests/unittests/sources/test_altcloud.py:157:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `user_data_rhevm` of type `def user_data_rhevm(self) -> Unknown`
+ tests/unittests/sources/test_altcloud.py:157:9: error[invalid-assignment] Object of type `() -> Literal[True]` is not assignable to attribute `user_data_rhevm` of type `def user_data_rhevm(self) -> Unknown`
- tests/unittests/sources/test_altcloud.py:169:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `user_data_vsphere` of type `def user_data_vsphere(self) -> Unknown`
+ tests/unittests/sources/test_altcloud.py:169:9: error[invalid-assignment] Object of type `() -> Literal[True]` is not assignable to attribute `user_data_vsphere` of type `def user_data_vsphere(self) -> Unknown`
- tests/unittests/sources/test_altcloud.py:181:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `user_data_rhevm` of type `def user_data_rhevm(self) -> Unknown`
+ tests/unittests/sources/test_altcloud.py:181:9: error[invalid-assignment] Object of type `() -> Literal[False]` is not assignable to attribute `user_data_rhevm` of type `def user_data_rhevm(self) -> Unknown`
- tests/unittests/sources/test_altcloud.py:190:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `user_data_vsphere` of type `def user_data_vsphere(self) -> Unknown`
+ tests/unittests/sources/test_altcloud.py:190:9: error[invalid-assignment] Object of type `() -> Literal[False]` is not assignable to attribute `user_data_vsphere` of type `def user_data_vsphere(self) -> Unknown`
- tests/unittests/sources/test_altcloud.py:225:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `user_data_rhevm` of type `def user_data_rhevm(self) -> Unknown`
+ tests/unittests/sources/test_altcloud.py:225:9: error[invalid-assignment] Object of type `() -> Literal[True]` is not assignable to attribute `user_data_rhevm` of type `def user_data_rhevm(self) -> Unknown`
- tests/unittests/sources/test_altcloud.py:235:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `user_data_vsphere` of type `def user_data_vsphere(self) -> Unknown`
+ tests/unittests/sources/test_altcloud.py:235:9: error[invalid-assignment] Object of type `() -> Literal[True]` is not assignable to attribute `user_data_vsphere` of type `def user_data_vsphere(self) -> Unknown`
- tests/unittests/sources/test_exoscale.py:72:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `ds_detect` of type `def ds_detect() -> Unknown`
+ tests/unittests/sources/test_exoscale.py:72:9: error[invalid-assignment] Object of type `() -> Literal[True]` is not assignable to attribute `ds_detect` of type `def ds_detect() -> Unknown`
- tests/unittests/sources/test_exoscale.py:114:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `ds_detect` of type `def ds_detect() -> Unknown`
+ tests/unittests/sources/test_exoscale.py:114:9: error[invalid-assignment] Object of type `() -> Literal[True]` is not assignable to attribute `ds_detect` of type `def ds_detect() -> Unknown`
- tests/unittests/sources/test_exoscale.py:150:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `ds_detect` of type `def ds_detect() -> Unknown`
+ tests/unittests/sources/test_exoscale.py:150:9: error[invalid-assignment] Object of type `() -> Literal[True]` is not assignable to attribute `ds_detect` of type `def ds_detect() -> Unknown`
- tests/unittests/sources/test_exoscale.py:216:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `ds_detect` of type `def ds_detect() -> Unknown`
+ tests/unittests/sources/test_exoscale.py:216:9: error[invalid-assignment] Object of type `() -> Literal[False]` is not assignable to attribute `ds_detect` of type `def ds_detect() -> Unknown`
- Found 1150 diagnostics
+ Found 1153 diagnostics

mkdocs (https://github.com/mkdocs/mkdocs)
- mkdocs/tests/livereload_tests.py:21:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `close` of type `def close(self) -> None`
+ mkdocs/tests/livereload_tests.py:21:9: error[invalid-assignment] Object of type `() -> None` is not assignable to attribute `close` of type `def close(self) -> None`

meson (https://github.com/mesonbuild/meson)
- docs/refman/main.py:42:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `colorize_console` of type `bound method _Logger.colorize_console() -> bool`
+ docs/refman/main.py:42:9: error[invalid-assignment] Object of type `() -> Literal[True]` is not assignable to attribute `colorize_console` of type `bound method _Logger.colorize_console() -> bool`
+ mesonbuild/cargo/manifest.py:339:38: error[invalid-assignment] Object of type `dataclasses.Field[list[Unknown | str]]` is not assignable to `list[Literal["bin", "lib", "dylib", "staticlib", "cdylib", "rlib", "proc-macro"]]`
- mesonbuild/dependencies/cuda.py:137:76: error[invalid-argument-type] Argument to function `version_compare_many` is incorrect: Expected `str`, found `str | None | Unknown`
+ mesonbuild/dependencies/cuda.py:137:76: error[invalid-argument-type] Argument to function `version_compare_many` is incorrect: Expected `str`, found `Unknown | str | None`
- unittests/internaltests.py:246:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `get_default_include_dirs` of type `def get_default_include_dirs(self) -> list[str]`
+ unittests/internaltests.py:246:9: error[invalid-assignment] Object of type `() -> list[Unknown | str]` is not assignable to attribute `get_default_include_dirs` of type `def get_default_include_dirs(self) -> list[str]`
- unittests/internaltests.py:276:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `get_default_include_dirs` of type `def get_default_include_dirs(self) -> list[str]`
+ unittests/internaltests.py:276:9: error[invalid-assignment] Object of type `() -> list[Unknown | str]` is not assignable to attribute `get_default_include_dirs` of type `def get_default_include_dirs(self) -> list[str]`
+ unittests/machinefiletests.py:154:26: error[unresolved-attribute] Attribute `id` is not defined on `None` in union `Compiler | None`
- Found 2206 diagnostics
+ Found 2208 diagnostics

xarray (https://github.com/pydata/xarray)
- xarray/tests/test_datatree_mapping.py:92:57: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- xarray/tests/test_datatree_mapping.py:104:62: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 1709 diagnostics
+ Found 1707 diagnostics

pyppeteer (https://github.com/pyppeteer/pyppeteer)
+ pyppeteer/browser.py:66:13: error[invalid-argument-type] Argument to bound method `setClosedCallback` is incorrect: Expected `() -> None`, found `() -> bool`
- Found 85 diagnostics
+ Found 86 diagnostics

trio (https://github.com/python-trio/trio)
- src/trio/_core/_tests/test_run.py:88:34: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- src/trio/_core/_tests/test_run.py:1048:64: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- src/trio/_tests/test_util.py:139:53: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 471 diagnostics
+ Found 468 diagnostics

zope.interface (https://github.com/zopefoundation/zope.interface)
- src/zope/interface/registry.py:552:9: error[invalid-assignment] Object of type `(_) -> Unknown` is not assignable to attribute `changed` on type `Unknown | AdapterRegistry`
+ src/zope/interface/registry.py:552:9: error[invalid-assignment] Object of type `(_) -> None` is not assignable to attribute `changed` on type `Unknown | AdapterRegistry`

openlibrary (https://github.com/internetarchive/openlibrary)
- openlibrary/book_providers.py:829:9: error[invalid-argument-type] Argument to function `multisort_best` is incorrect: Expected `list[tuple[Literal["min", "max"], (Unknown | tuple[Edition, AbstractBookProvider[Unknown] | None], /) -> int | float]]`, found `list[Unknown | tuple[str, (rec) -> Unknown]]`
+ openlibrary/book_providers.py:829:9: error[invalid-argument-type] Argument to function `multisort_best` is incorrect: Expected `list[tuple[Literal["min", "max"], (Unknown | tuple[Edition, AbstractBookProvider[Unknown] | None], /) -> int | float]]`, found `list[Unknown | tuple[str, (rec) -> int | float]]`
- openlibrary/catalog/utils/__init__.py:132:17: error[unresolved-attribute] Attribute `search` is not defined on `str` in union `Unknown | str`
+ openlibrary/catalog/utils/__init__.py:132:17: error[unresolved-attribute] Attribute `search` is not defined on `str` in union `str | Unknown`
- openlibrary/conftest.py:146:5: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `init_plugin` of type `def init_plugin() -> Unknown`
+ openlibrary/conftest.py:146:5: error[invalid-assignment] Object of type `() -> None` is not assignable to attribute `init_plugin` of type `def init_plugin() -> Unknown`

prefect (https://github.com/PrefectHQ/prefect)
- src/integrations/prefect-github/prefect_github/utils.py:46:12: error[invalid-return-type] Return type does not match returned value: expected `list[Unknown]`, found `defaultdict[Unknown, Unknown]`
+ src/integrations/prefect-github/prefect_github/utils.py:46:12: error[invalid-return-type] Return type does not match returned value: expected `list[Unknown]`, found `defaultdict[Unknown, list[Unknown]]`
- src/prefect/input/run_input.py:672:20: error[invalid-return-type] Return type does not match returned value: expected `T@GetAutomaticInputHandler | AutomaticRunInput[T@GetAutomaticInputHandler]`, found `Unknown | Coroutine[Any, Any, Unknown]`
+ src/prefect/input/run_input.py:672:20: error[invalid-return-type] Return type does not match returned value: expected `T@GetAutomaticInputHandler | AutomaticRunInput[T@GetAutomaticInputHandler]`, found `T@GetAutomaticInputHandler | AutomaticRunInput[T@GetAutomaticInputHandler] | Coroutine[Any, Any, T@GetAutomaticInputHandler | AutomaticRunInput[T@GetAutomaticInputHandler]]`

cwltool (https://github.com/common-workflow-language/cwltool)
- cwltool/main.py:165:9: error[invalid-assignment] Object of type `(*args) -> Unknown` is not assignable to attribute `default_user_agent` of type `def default_user_agent(name: str = "python-requests") -> str`
+ cwltool/main.py:165:9: error[invalid-assignment] Object of type `(*args) -> str` is not assignable to attribute `default_user_agent` of type `def default_user_agent(name: str = "python-requests") -> str`

setuptools (https://github.com/pypa/setuptools)
- setuptools/build_meta.py:107:5: error[invalid-assignment] Object of type `(attrs) -> Unknown` is not assignable to attribute `_install_setup_requires` of type `def _install_setup_requires(attrs) -> Unknown`
+ setuptools/build_meta.py:107:5: error[invalid-assignment] Object of type `(attrs) -> None` is not assignable to attribute `_install_setup_requires` of type `def _install_setup_requires(attrs) -> Unknown`

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) -> object) | (((str | None, /) -> str | None) & ~Top[Mapping[Unknown, object]])` is not assignable to `(str | None, /) -> str | None`
- Found 518 diagnostics
+ Found 519 diagnostics

manticore (https://github.com/trailofbits/manticore)
- manticore/native/plugins.py:13:9: error[invalid-assignment] Object of type `(...) -> Unknown` is not assignable to attribute `_publish` on type `Unknown | None`
+ manticore/native/plugins.py:13:9: error[invalid-assignment] Object of type `(...) -> None` is not assignable to attribute `_publish` on type `Unknown | None`

pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/aglib/disasm/disassembly.py:102:60: error[invalid-assignment] Object of type `defaultdict[int, int | None]` is not assignable to `defaultdict[int, int]`
+ pwndbg/aglib/heap/ptmalloc.py:1416:20: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ pwndbg/aglib/heap/ptmalloc.py:1417:20: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ pwndbg/aglib/heap/ptmalloc.py:1418:28: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ pwndbg/aglib/heap/ptmalloc.py:1419:28: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- pwndbg/gdblib/tui/context.py:221:24: error[invalid-assignment] Object of type `(...) -> Unknown` is not assignable to `def _ansi_substr(self, line: str, start_char: int, end_char: int) -> str`
+ pwndbg/gdblib/tui/context.py:221:24: error[invalid-assignment] Object of type `(...) -> Unknown | str` is not assignable to `def _ansi_substr(self, line: str, start_char: int, end_char: int) -> str`
- Found 1900 diagnostics
+ Found 1905 diagnostics

scikit-build-core (https://github.com/scikit-build/scikit-build-core)
+ src/scikit_build_core/build/wheel.py:99:20: error[no-matching-overload] No overload of bound method `__init__` matches arguments
- Found 50 diagnostics
+ Found 51 diagnostics

pycryptodome (https://github.com/Legrandin/pycryptodome)
- lib/Crypto/SelfTest/Protocol/test_KDF.py:142:26: error[invalid-argument-type] Argument to function `PBKDF2` is incorrect: Expected `((int, /) -> bytes) | None`, found `(p, s) -> Unknown`
+ lib/Crypto/SelfTest/Protocol/test_KDF.py:142:26: error[invalid-argument-type] Argument to function `PBKDF2` is incorrect: Expected `((int, /) -> bytes) | None`, found `(p, s) -> bytes`

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- ddtrace/debugging/_debugger.py:266:63: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | DerivedVariable[str | Unknown]`
+ ddtrace/debugging/_debugger.py:266:63: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | DerivedVariable[str | (Unknown & ~AlwaysFalsy)]`
- ddtrace/debugging/_debugger.py:266:63: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | DerivedVariable[str | Unknown]`
+ ddtrace/debugging/_debugger.py:266:63: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | DerivedVariable[str | (Unknown & ~AlwaysFalsy)]`
- ddtrace/debugging/_debugger.py:274:13: error[invalid-argument-type] Argument is incorrect: Expected `int | float`, found `Unknown | DerivedVariable[int | float | Unknown]`
+ ddtrace/debugging/_debugger.py:274:13: error[invalid-argument-type] Argument is incorrect: Expected `int | float`, found `Unknown | DerivedVariable[int | float]`
- ddtrace/debugging/_probe/status.py:34:35: error[invalid-argument-type] Argument to function `connector` is incorrect: Expected `str`, found `Unknown | DerivedVariable[str | Unknown]`
+ ddtrace/debugging/_probe/status.py:34:35: error[invalid-argument-type] Argument to function `connector` is incorrect: Expected `str`, found `Unknown | DerivedVariable[str | DerivedVariable[str] | Unknown]`
- ddtrace/debugging/_redaction.py:123:12: error[unresolved-attribute] Attribute `search` is not defined on `DerivedVariable[Unknown]` in union `(Unknown & ~None) | DerivedVariable[Unknown]`
+ ddtrace/debugging/_redaction.py:123:12: error[unresolved-attribute] Attribute `search` is not defined on `DerivedVariable[Pattern[str] | None]` in union `(Unknown & ~None) | DerivedVariable[Pattern[str] | None]`
- ddtrace/debugging/_signal/utils.py:223:38: error[unresolved-attribute] Attribute `__name__` is not defined on `(Any, /) -> bool` in union `((Any, /) -> bool) | ((_) -> Unknown)`
+ ddtrace/debugging/_signal/utils.py:223:38: error[unresolved-attribute] Object of type `(Any, /) -> bool` has no attribute `__name__`
- ddtrace/debugging/_signal/utils.py:253:38: error[unresolved-attribute] Attribute `__name__` is not defined on `(Any, /) -> bool` in union `((Any, /) -> bool) | ((_) -> Unknown)`
+ ddtrace/debugging/_signal/utils.py:253:38: error[unresolved-attribute] Object of type `(Any, /) -> bool` has no attribute `__name__`
- ddtrace/debugging/_signal/utils.py:309:41: error[unresolved-attribute] Attribute `__name__` is not defined on `(Any, /) -> bool` in union `((Any, /) -> bool) | ((_) -> Unknown)`
+ ddtrace/debugging/_signal/utils.py:309:41: error[unresolved-attribute] Object of type `(Any, /) -> bool` has no attribute `__name__`
- ddtrace/debugging/_signal/utils.py:328:34: error[unresolved-attribute] Attribute `__name__` is not defined on `(Any, /) -> bool` in union `((Any, /) -> bool) | ((_) -> Unknown)`
+ ddtrace/debugging/_signal/utils.py:328:34: error[unresolved-attribute] Object of type `(Any, /) -> bool` has no attribute `__name__`
- ddtrace/debugging/_signal/utils.py:354:37: error[unresolved-attribute] Attribute `__name__` is not defined on `(Any, /) -> bool` in union `((Any, /) -> bool) | ((_) -> Unknown)`
+ ddtrace/debugging/_signal/utils.py:354:37: error[unresolved-attribute] Object of type `(Any, /) -> bool` has no attribute `__name__`
- ddtrace/debugging/_uploader.py:79:50: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | DerivedVariable[str | Unknown]`
+ ddtrace/debugging/_uploader.py:79:50: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | DerivedVariable[str | (Unknown & ~AlwaysFalsy)]`
- ddtrace/debugging/_uploader.py:85:66: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | DerivedVariable[str | Unknown]`
+ ddtrace/debugging/_uploader.py:85:66: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | DerivedVariable[str | (Unknown & ~AlwaysFalsy)]`
- ddtrace/debugging/_uploader.py:94:35: error[invalid-argument-type] Argument to function `connector` is incorrect: Expected `str`, found `Unknown | DerivedVariable[str | Unknown]`
+ ddtrace/debugging/_uploader.py:94:35: error[invalid-argument-type] Argument to function `connector` is incorrect: Expected `str`, found `Unknown | DerivedVariable[str | DerivedVariable[str] | Unknown]`
- ddtrace/internal/symbol_db/symbols.py:581:34: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Unknown]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Unknown]`
+ ddtrace/internal/symbol_db/symbols.py:581:34: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Pattern[str]]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Pattern[str]]`
- ddtrace/internal/symbol_db/symbols.py:599:36: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Unknown]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Unknown]`
+ ddtrace/internal/symbol_db/symbols.py:599:36: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Pattern[str]]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Pattern[str]]`
- scripts/freshvenvs.py:343:69: error[invalid-argument-type] Argument to function `_versions_fully_cover_bounds` is incorrect: Expected `list[str]`, found `list[Version | Unknown] & ~AlwaysFalsy`
+ scripts/freshvenvs.py:343:69: error[invalid-argument-type] Argument to function `_versions_fully_cover_bounds` is incorrect: Expected `list[str]`, found `list[Unknown | Version] & ~AlwaysFalsy`
+ tests/appsec/appsec/test_asm_request_context.py:99:9: error[invalid-argument-type] Argument is incorrect: Expected `(() -> bool) | None`, found `() -> Literal[42]`
- tests/ci_visibility/test_atr.py:74:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `efd_is_faulty_session` of type `def efd_is_faulty_session(self) -> Unknown`
+ tests/ci_visibility/test_atr.py:74:9: error[invalid-assignment] Object of type `() -> Literal[False]` is not assignable to attribute `efd_is_faulty_session` of type `def efd_is_faulty_session(self) -> Unknown`
- tests/ci_visibility/test_atr.py:169:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `efd_is_faulty_session` of type `def efd_is_faulty_session(self) -> Unknown`
+ tests/ci_visibility/test_atr.py:169:9: error[invalid-assignment] Object of type `() -> Literal[False]` is not assignable to attribute `efd_is_faulty_session` of type `def efd_is_faulty_session(self) -> Unknown`
- tests/ci_visibility/test_atr.py:175:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `get_session` of type `def get_session(self) -> TestVisibilitySession | None`
+ tests/ci_visibility/test_atr.py:175:9: error[invalid-assignment] Object of type `() -> TestVisibilitySession` is not assignable to attribute `get_session` of type `def get_session(self) -> TestVisibilitySession | None`
- tests/debugging/mocking.py:194:9: error[invalid-assignment] Object of type `(_) -> Unknown` is not assignable to attribute `register` of type `def register[**_P, _T](func: (**_P) -> _T, /, *args: _P.args, **kwargs: _P.kwargs) -> (**_P) -> _T`
+ tests/debugging/mocking.py:194:9: error[invalid-assignment] Object of type `(_) -> None` is not assignable to attribute `register` of type `def register[**_P, _T](func: (**_P) -> _T, /, *args: _P.args, **kwargs: _P.kwargs) -> (**_P) -> _T`
- tests/internal/symbol_db/test_config.py:8:12: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Unknown]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Unknown]`
+ tests/internal/symbol_db/test_config.py:8:12: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Pattern[str]]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Pattern[str]]`
- tests/internal/symbol_db/test_config.py:9:12: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Unknown]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Unknown]`
+ tests/internal/symbol_db/test_config.py:9:12: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Pattern[str]]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Pattern[str]]`
- tests/internal/symbol_db/test_config.py:10:12: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Unknown]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Unknown]`
+ tests/internal/symbol_db/test_config.py:10:12: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Pattern[str]]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Pattern[str]]`
- tests/internal/symbol_db/test_config.py:12:12: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Unknown]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Unknown]`
+ tests/internal/symbol_db/test_config.py:12:12: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Pattern[str]]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Pattern[str]]`
- tests/internal/symbol_db/test_config.py:13:12: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Unknown]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Unknown]`
+ tests/internal/symbol_db/test_config.py:13:12: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Pattern[str]]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Pattern[str]]`
- tests/internal/symbol_db/test_config.py:14:12: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Unknown]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Unknown]`
+ tests/internal/symbol_db/test_config.py:14:12: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Pattern[str]]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Pattern[str]]`
- tests/testing/internal/test_telemetry.py:396:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `is_benchmark` of type `def is_benchmark(self) -> bool`
+ tests/testing/internal/test_telemetry.py:396:9: error[invalid-assignment] Object of type `() -> Literal[True]` is not assignable to attribute `is_benchmark` of type `def is_benchmark(self) -> bool`
- tests/tracer/test_span.py:193:29: error[invalid-argument-type] Argument to bound method `set_metric` is incorrect: Expected `int | float`, found `Span | Unknown | None | ... omitted 6 union elements`
+ tests/tracer/test_span.py:193:29: error[invalid-argument-type] Argument to bound method `set_metric` is incorrect: Expected `int | float`, found `Unknown | None | dict[Unknown, Unknown] | ... omitted 6 union elements`
- Found 9036 diagnostics
+ Found 9037 diagnostics

django-stubs (https://github.com/typeddjango/django-stubs)
- tests/assert_type/apps/test_config.py:38:1: error[type-assertion-failure] Type `str` does not match asserted type `Unknown`
+ tests/assert_type/apps/test_config.py:38:1: error[type-assertion-failure] Type `str` does not match asserted type `Unknown | Literal["django.db.models.BigAutoField"]`

bokeh (https://github.com/bokeh/bokeh)
- src/bokeh/models/annotations/geometry.py:298:47: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `() -> Unknown` does not satisfy upper bound `Serializable` of type variable `S`
+ src/bokeh/models/annotations/geometry.py:298:47: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `() -> BoxInteractionHandles` does not satisfy upper bound `Serializable` of type variable `S`
- src/bokeh/models/annotations/geometry.py:298:47: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `BoxInteractionHandles | UndefinedType | IntrinsicType`, found `() -> Unknown`
+ src/bokeh/models/annotations/geometry.py:298:47: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `BoxInteractionHandles | UndefinedType | IntrinsicType`, found `() -> BoxInteractionHandles`
+ src/bokeh/models/annotations/legends.py:551:9: error[invalid-argument-type] Argument to bound method `accepts` is incorrect: Expected `(Any, /) -> LegendItem`, found `(items) -> list[Unknown | LegendItem]`
+ src/bokeh/models/layouts.py:587:18: error[invalid-argument-type] Argument to bound method `accepts` is incorrect: Expected `(Any, /) -> TabPanel`, found `(items) -> list[Unknown | TabPanel]`
- src/bokeh/models/renderers/graph_renderer.py:84:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `() -> Unknown` does not satisfy upper bound `Serializable` of type variable `S`
+ src/bokeh/models/renderers/graph_renderer.py:84:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `() -> GlyphRenderer[Unknown]` does not satisfy upper bound `Serializable` of type variable `S`
- src/bokeh/models/renderers/graph_renderer.py:84:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `GlyphRenderer[Unknown] | UndefinedType | IntrinsicType`, found `() -> Unknown`
+ src/bokeh/models/renderers/graph_renderer.py:84:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `GlyphRenderer[Unknown] | UndefinedType | IntrinsicType`, found `() -> GlyphRenderer[Unknown]`
- src/bokeh/models/renderers/graph_renderer.py:89:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `() -> Unknown` does not satisfy upper bound `Serializable` of type variable `S`
+ src/bokeh/models/renderers/graph_renderer.py:89:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `() -> GlyphRenderer[Unknown]` does not satisfy upper bound `Serializable` of type variable `S`
- src/bokeh/models/renderers/graph_renderer.py:89:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `GlyphRenderer[Unknown] | UndefinedType | IntrinsicType`, found `() -> Unknown`
+ src/bokeh/models/renderers/graph_renderer.py:89:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `GlyphRenderer[Unknown] | UndefinedType | IntrinsicType`, found `() -> GlyphRenderer[Unknown]`
- src/bokeh/models/tools.py:573:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `() -> Unknown` does not satisfy upper bound `Serializable` of type variable `S`
+ src/bokeh/models/tools.py:573:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `() -> BoxAnnotation` does not satisfy upper bound `Serializable` of type variable `S`
- src/bokeh/models/tools.py:573:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `BoxAnnotation | UndefinedType | IntrinsicType`, found `() -> Unknown`
+ src/bokeh/models/tools.py:573:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `BoxAnnotation | UndefinedType | IntrinsicType`, found `() -> BoxAnnotation`
- Found 840 diagnostics
+ Found 842 diagnostics

cryptography (https://github.com/pyca/cryptography)
- tests/hazmat/primitives/test_dsa.py:940:33: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/hazmat/primitives/test_dsa.py:955:35: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/hazmat/primitives/test_dsa.py:970:33: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/hazmat/primitives/test_ec.py:1020:33: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/hazmat/primitives/test_ec.py:1036:35: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/hazmat/primitives/test_ec.py:1052:33: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/hazmat/primitives/test_ec.py:1363:33: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/hazmat/primitives/test_ec.py:1411:35: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/hazmat/primitives/test_ec.py:1646:51: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 49 diagnostics
+ Found 40 diagnostics

ibis (https://github.com/ibis-project/ibis)
- ibis/common/tests/test_annotations.py:84:27: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Pattern`, found `(x, *_, **__) -> Unknown`
+ ibis/common/tests/test_annotations.py:84:27: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Pattern`, found `(x, *_, **__) -> int`
- ibis/common/tests/test_annotations.py:125:24: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Pattern`, found `(x, *_, **__) -> Unknown`
+ ibis/common/tests/test_annotations.py:125:24: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Pattern`, found `(x, *_, **__) -> str`
- ibis/selectors.py:333:16: error[invalid-return-type] Return type does not match returned value: expected `frozenset[str]`, found `frozenset[str | Buffer | Unknown]`
+ ibis/selectors.py:333:16: error[invalid-return-type] Return type does not match returned value: expected `frozenset[str]`, found `frozenset[Unknown | str | Buffer]`
- ibis/selectors.py:428:13: error[invalid-assignment] Object of type `frozenset[str | Unknown]` is not assignable to `tuple[str | Column, ...]`
+ ibis/selectors.py:428:13: error[invalid-assignment] Object of type `frozenset[Unknown | str]` is not assignable to `tuple[str | Column, ...]`

static-frame (https://github.com/static-frame/static-frame)
+ static_frame/test/unit/test_frame.py:6736:24: error[no-matching-overload] No overload of bound method `__init__` matches arguments
- Found 1855 diagnostics
+ Found 1856 diagnostics

zulip (https://github.com/zulip/zulip)
+ zerver/lib/upload/local.py:117:13: error[invalid-argument-type] Argument is incorrect: Expected `() -> ReadableStream`, found `() -> BufferedReader[_BufferedReaderStream]`
- Found 4573 diagnostics
+ Found 4574 diagnostics

pandas (https://github.com/pandas-dev/pandas)
- pandas/core/methods/describe.py:215:21: error[not-iterable] Object of type `Unknown | Sized` may not be iterable
+ pandas/core/methods/describe.py:215:21: error[not-iterable] Object of type `Sized | Unknown` may not be iterable
+ pandas/tests/io/excel/test_readers.py:819:13: error[no-matching-overload] No overload of function `read_excel` matches arguments
- pandas/tests/io/formats/test_to_html.py:329:25: error[invalid-argument-type] Argument to bound method `to_html` is incorrect: Expected `list[(...) -> Unknown] | tuple[(...) -> Unknown, ...] | Mapping[str | int, (...) -> Unknown] | None`, found `list[Unknown | ((x) -> Unknown) | None]`
+ pandas/tests/io/formats/test_to_html.py:329:25: error[invalid-argument-type] Argument to bound method `to_html` is incorrect: Expected `list[(...) -> Unknown] | tuple[(...) -> Unknown, ...] | Mapping[str | int, (...) -> Unknown] | None`, found `list[Unknown | ((x) -> str) | None]`
- pandas/tests/io/test_common.py:396:9: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `fileno` of type `def fileno(self) -> int`
+ pandas/tests/io/test_common.py:396:9: error[invalid-assignment] Object of type `() -> Literal[-1]` is not assignable to attribute `fileno` of type `def fileno(self) -> int`
- pandas/tests/io/test_gcs.py:36:5: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `close` of type `def close(self) -> None`
+ pandas/tests/io/test_gcs.py:36:5: error[invalid-assignment] Object of type `() -> Literal[True]` is not assignable to attribute `close` of type `def close(self) -> None`
- Found 4428 diagnostics
+ Found 4429 diagnostics

jax (https://github.com/google/jax)
- jax/_src/ad_checkp

... (truncated 390 lines) ...

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Feb 16, 2026

Memory usage report

Summary

Project Old New Diff Outcome
prefect 694.15MB 694.28MB +0.02% (131.67kB)
sphinx 276.42MB 276.48MB +0.02% (63.20kB)
trio 120.57MB 120.58MB +0.00% (5.06kB)
flake8 49.73MB 49.73MB +0.00% (576.00B)

Significant changes

Click to expand detailed breakdown

prefect

Name Old New Diff Outcome
CallableType 1.89MB 1.91MB +1.25% (24.12kB)
infer_definition_types 86.89MB 86.91MB +0.02% (16.35kB)
infer_expression_types_impl 54.35MB 54.36MB +0.02% (11.86kB)
Type<'db>::apply_specialization_ 3.70MB 3.71MB +0.25% (9.40kB)
is_redundant_with_impl::interned_arguments 5.52MB 5.53MB +0.15% (8.42kB)
is_redundant_with_impl 5.58MB 5.58MB +0.12% (6.74kB)
Type<'db>::try_call_dunder_get_ 11.21MB 11.21MB +0.05% (6.27kB)
Type<'db>::apply_specialization_::interned_arguments 2.82MB 2.82MB +0.21% (6.09kB)
Type<'db>::class_member_with_policy_ 16.88MB 16.88MB +0.03% (5.16kB)
IntersectionType 2.48MB 2.48MB +0.16% (4.10kB)
FunctionType 8.18MB 8.18MB +0.05% (4.08kB)
UnionType 3.59MB 3.59MB +0.10% (3.58kB)
Type<'db>::class_member_with_policy_::interned_arguments 8.86MB 8.86MB +0.04% (3.55kB)
StaticClassLiteral<'db>::try_mro_ 6.03MB 6.03MB +0.05% (3.35kB)
infer_scope_types_impl 57.89MB 57.89MB +0.00% (2.54kB)
... 35 more

sphinx

Name Old New Diff Outcome
CallableType 1.12MB 1.13MB +0.59% (6.75kB)
Type<'db>::try_call_dunder_get_ 5.49MB 5.50MB +0.11% (6.35kB)
Type<'db>::class_member_with_policy_ 7.84MB 7.85MB +0.06% (4.52kB)
FunctionType 3.16MB 3.16MB +0.14% (4.42kB)
StaticClassLiteral<'db>::try_mro_ 2.16MB 2.17MB +0.19% (4.31kB)
infer_definition_types 25.23MB 25.23MB +0.02% (4.20kB)
is_redundant_with_impl 1.84MB 1.85MB +0.17% (3.14kB)
Type<'db>::class_member_with_policy_::interned_arguments 3.99MB 4.00MB +0.07% (3.05kB)
FunctionType<'db>::signature_ 2.29MB 2.30MB +0.11% (2.69kB)
is_redundant_with_impl::interned_arguments 2.13MB 2.13MB +0.12% (2.58kB)
Type<'db>::apply_specialization_ 1.74MB 1.75MB +0.14% (2.57kB)
infer_scope_types_impl 17.56MB 17.56MB +0.01% (1.77kB)
Type<'db>::apply_specialization_::interned_arguments 1.48MB 1.48MB +0.11% (1.64kB)
Specialization 1.05MB 1.05MB +0.15% (1.58kB)
IntersectionType 1.02MB 1.02MB +0.13% (1.31kB)
... 23 more

trio

Name Old New Diff Outcome
CallableType 596.80kB 598.63kB +0.31% (1.83kB)
is_redundant_with_impl::interned_arguments 557.39kB 558.08kB +0.12% (704.00B)
is_redundant_with_impl 484.93kB 485.61kB +0.14% (696.00B)
infer_expression_types_impl 6.31MB 6.31MB +0.01% (648.00B)
infer_definition_types 7.80MB 7.80MB +0.01% (432.00B)
IntersectionType 251.28kB 251.61kB +0.13% (336.00B)
infer_scope_types_impl 5.48MB 5.48MB +0.01% (324.00B)
UnionType 338.72kB 338.88kB +0.05% (160.00B)
infer_deferred_types 2.47MB 2.47MB +0.00% (12.00B)

flake8

Name Old New Diff Outcome
infer_scope_types_impl 1.09MB 1.09MB +0.03% (384.00B)
CallableType 182.11kB 182.25kB +0.08% (144.00B)
infer_definition_types 1.95MB 1.95MB +0.00% (36.00B)
infer_expression_types_impl 1.12MB 1.12MB +0.00% (12.00B)

@alex alex marked this pull request as ready for review February 16, 2026 02:27
@AlexWaygood AlexWaygood added ty Multi-file analysis & type inference ecosystem-analyzer labels Feb 16, 2026
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Feb 16, 2026

ecosystem-analyzer results

Lint rule Added Removed Changed
invalid-argument-type 17 16 118
invalid-assignment 10 0 42
unresolved-attribute 7 0 23
unused-type-ignore-comment 1 19 0
unsupported-operator 7 0 4
type-assertion-failure 0 5 1
no-matching-overload 4 0 0
not-subscriptable 4 0 0
invalid-return-type 2 0 1
invalid-await 1 0 0
not-iterable 0 0 1
Total 53 40 190

Full report with detailed diff (timing results)

@alex
Copy link
Copy Markdown
Contributor Author

alex commented Feb 16, 2026

Important note, as indicated in a comment, this is kind of the bare minimum to infer types for lambdas where the return type isn't specific to the callsite/argument types. I'm hoping that since the volume of code is so minimal that it's an ok stepping stone.

@AlexWaygood
Copy link
Copy Markdown
Member

you may have seen the previous attempt in #22633 -- that one was attempting something slightly more ambitious with full type context, but it might be helpful for you

@alex
Copy link
Copy Markdown
Contributor Author

alex commented Feb 16, 2026

Yeah, the test case from that is what led to discovering the cyclic issues. Given my lack of certainty about the correctness of those fixes, I figured I'd start with the most basic implementation.

@ibraheemdev
Copy link
Copy Markdown
Member

I'm not sure this usefully narrows scope compared to #22633. The benefit of inferring with type context is that we avoid false positives on e.g., _: Callable[[], MyTypedDict] = lambda: { "foo": 1 }, and extracting the type context from the callable annotation is relatively trivial.

I also don't think introducing cycle fallback based on an iteration threshold is a good idea. Based on the dicussion in #22818, we have a good idea of what the issue is, and I would rather delay this feature and work on a concrete solution than introduce fallbacks in arbitrary queries. Our recursive type inference should be robust to all of these issues.

@alex
Copy link
Copy Markdown
Contributor Author

alex commented Feb 19, 2026 via email

@ibraheemdev
Copy link
Copy Markdown
Member

Closing this for now.

@alex alex deleted the claude/infer-lambda-return-types-1uGZd branch February 20, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ecosystem-analyzer ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants