Skip to content

[ty] Infer lambda expressions with Callable type context#22633

Merged
ibraheemdev merged 3 commits intomainfrom
ibraheem/lambda-tcx
Mar 26, 2026
Merged

[ty] Infer lambda expressions with Callable type context#22633
ibraheemdev merged 3 commits intomainfrom
ibraheem/lambda-tcx

Conversation

@ibraheemdev
Copy link
Copy Markdown
Member

@ibraheemdev ibraheemdev commented Jan 16, 2026

Infer lambda expressions eagerly as part of their parent scope, and with type context. This allows us to infer more precise types for lambda expressions, as well as perform check assignability against Callable annotations.

Note that this does not change the inferred type of a lambda parameter with the body of the lambda, even if it is annotated. That part is a little more tricky, so will be addressed in a followup PR.

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

astral-sh-bot bot commented Jan 16, 2026

Typing conformance results

No changes detected ✅

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

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Jan 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: Any, b: Any) -> _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 667 diagnostics
+ Found 668 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 92 diagnostics
+ Found 93 diagnostics

spack (https://github.com/spack/spack)
- lib/spack/spack/cmd/find.py:231:13: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["start_date", "end_date"]` and value of type `datetime` on object of type `dict[str, InstallRecordStatus | None | ((x) -> Unknown) | bool]`
+ lib/spack/spack/cmd/find.py:231:13: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["start_date", "end_date"]` and value of type `datetime` on object of type `dict[str, InstallRecordStatus | None | ((x) -> bool) | bool]`
- 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:1084: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:1090: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:1094: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:1103: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:1107: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/util/s3.py:61:16: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[tuple[str, str], Any].__getitem__(key: tuple[str, str], /) -> Any` cannot be called with key of type `tuple[None | str | Unknown, Unknown | Literal["fetch"]]` on object of type `dict[tuple[str, str], Any]`
+ lib/spack/spack/util/s3.py:61:16: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[tuple[str, str], Any].__getitem__(key: tuple[str, str], /) -> Any` cannot be called with key of type `tuple[None | str | UnspecializedTypeVar, Unknown | Literal["fetch"]]` on object of type `dict[tuple[str, str], Any]`
- lib/spack/spack/util/s3.py:75:5: error[invalid-assignment] Invalid subscript assignment with key of type `tuple[None | str | Unknown, Unknown | Literal["fetch"]]` and value of type `Unknown` on object of type `dict[tuple[str, str], Any]`
+ lib/spack/spack/util/s3.py:75:5: error[invalid-assignment] Invalid subscript assignment with key of type `tuple[None | str | UnspecializedTypeVar, Unknown | Literal["fetch"]]` and value of type `Unknown` on object of type `dict[tuple[str, str], Any]`
- 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 `bytes | UnspecializedTypeVar | 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 `bytes | UnspecializedTypeVar | str | PathLike[str] | PathLike[bytes]` and value of type `bytes | UnspecializedTypeVar | 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[bytes | UnspecializedTypeVar | str | PathLike[str] | PathLike[bytes]]`
- Found 4466 diagnostics
+ Found 4459 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`

jinja (https://github.com/pallets/jinja)
- examples/basic/translate.py:5:1: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["ngettext"]` and value of type `(s, p, n) -> Unknown` on object of type `dict[str, <class 'range'> | <class 'dict'> | ((n: int = 5, html: bool = True, min: int = 20, max: int = 100) -> str) | ... omitted 3 union elements]`
+ examples/basic/translate.py:5:1: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["ngettext"]` and value of type `(s: int, p: bool, n: int) -> str` on object of type `dict[str, <class 'range'> | <class 'dict'> | ((n: int = 5, html: bool = True, min: int = 20, max: int = 100) -> str) | ... omitted 3 union elements]`
- tests/test_async.py:655:5: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["add_each"]` and value of type `(v, x) -> Unknown` on object of type `dict[str, <class 'range'> | <class 'dict'> | ((n: int = 5, html: bool = True, min: int = 20, max: int = 100) -> str) | ... omitted 3 union elements]`
+ tests/test_async.py:655:5: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["add_each"]` and value of type `(v: int, x: bool) -> list[Unknown]` on object of type `dict[str, <class 'range'> | <class 'dict'> | ((n: int = 5, html: bool = True, min: int = 20, max: int = 100) -> str) | ... omitted 3 union elements]`
- tests/test_ext.py:291:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["gettext"]` and value of type `(x) -> Unknown` on object of type `dict[str, <class 'range'> | <class 'dict'> | ((n: int = 5, html: bool = True, min: int = 20, max: int = 100) -> str) | ... omitted 3 union elements]`
+ tests/test_ext.py:291:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["gettext"]` and value of type `(x: int) -> Unknown` on object of type `dict[str, <class 'range'> | <class 'dict'> | ((n: int = 5, html: bool = True, min: int = 20, max: int = 100) -> str) | ... omitted 3 union elements]`
- tests/test_lexnparse.py:320:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["foo"]` and value of type `(a, b, c, e, g) -> Unknown` on object of type `dict[str, <class 'range'> | <class 'dict'> | ((n: int = 5, html: bool = True, min: int = 20, max: int = 100) -> str) | ... omitted 3 union elements]`
+ tests/test_lexnparse.py:320:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["foo"]` and value of type `(a: int, b: bool, c: int, e: int, g) -> Unknown` on object of type `dict[str, <class 'range'> | <class 'dict'> | ((n: int = 5, html: bool = True, min: int = 20, max: int = 100) -> str) | ... omitted 3 union elements]`
- tests/test_regression.py:354:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["get_int"]` and value of type `() -> Unknown` on object of type `dict[str, <class 'range'> | <class 'dict'> | ((n: int = 5, html: bool = True, min: int = 20, max: int = 100) -> str) | ... omitted 3 union elements]`
+ tests/test_regression.py:354:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["get_int"]` and value of type `() -> Literal[42]` on object of type `dict[str, <class 'range'> | <class 'dict'> | ((n: int = 5, html: bool = True, min: int = 20, max: int = 100) -> str) | ... omitted 3 union elements]`

werkzeug (https://github.com/pallets/werkzeug)
+ src/werkzeug/_reloader.py:390:35: error[invalid-argument-type] Argument to function `signal` is incorrect: Expected `((int, FrameType | None, /) -> Any) | int | None`, found `(*args: int) -> Never`
- 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`
- Found 386 diagnostics
+ Found 387 diagnostics

aiortc (https://github.com/aiortc/aiortc)
+ src/aiortc/rtcdtlstransport.py:199:64: error[invalid-argument-type] Argument to bound method `set_verify` is incorrect: Expected `((Connection, X509, int, int, int, /) -> bool) | None`, found `(*args: Connection) -> Literal[True]`
- Found 201 diagnostics
+ Found 202 diagnostics

paasta (https://github.com/yelp/paasta)
+ paasta_tools/frameworks/constraints.py:24:37: error[invalid-assignment] Object of type `dict[str, ((str, str, str, dict[str, dict[str, Any]], /) -> bool) | ((cv: str, ov: str, *_: str) -> Unknown) | ((cv: str, ov: str, *_: str) -> bool)]` is not assignable to `dict[str, (str, str, str, dict[str, dict[str, Any]], /) -> bool]`
- 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 | Unknown]]`
+ 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]]`
- Found 1077 diagnostics
+ Found 1078 diagnostics

graphql-core (https://github.com/graphql-python/graphql-core)
+ tests/validation/test_validation.py:49:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `((GraphQLSchema, GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType, FieldNode, /) -> GraphQLField | None) | None`, found `(*_args: GraphQLSchema) -> None`
- Found 638 diagnostics
+ Found 639 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

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 437 diagnostics
+ Found 438 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: Engine) -> 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: Engine, batch: Any, 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: Engine) -> dict[str, int]`
- Found 2223 diagnostics
+ Found 2224 diagnostics

mkosi (https://github.com/systemd/mkosi)
- mkosi/run.py:71:5: error[invalid-assignment] Object of type `(filename=None) -> Unknown` is not assignable to attribute `checkcache` of type `def checkcache(filename: str | None = None) -> None`
+ mkosi/run.py:71:5: error[invalid-assignment] Object of type `(filename=None) -> None` is not assignable to attribute `checkcache` of type `def checkcache(filename: str | None = None) -> None`

tornado (https://github.com/tornadoweb/tornado)
- tornado/ioloop.py:519:29: error[invalid-argument-type] Argument to bound method `add_future` is incorrect: Expected `_asyncio.Future[Unknown] | concurrent.futures._base.Future[Unknown]`, found `bool`
+ tornado/ioloop.py:519:29: error[invalid-argument-type] Argument to bound method `add_future` is incorrect: Expected `_asyncio.Future[UnspecializedTypeVar] | concurrent.futures._base.Future[UnspecializedTypeVar]`, found `bool`
- tornado/test/escape_test.py:217:51: error[invalid-argument-type] Argument to function `linkify` is incorrect: Expected `bool`, found `Unknown | list[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[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[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[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[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[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[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[str] | bool | str | ((href) -> str)`

schemathesis (https://github.com/schemathesis/schemathesis)
+ src/schemathesis/cli/commands/run/handlers/output.py:706:70: error[invalid-assignment] Object of type `dataclasses.Field[dict[PhaseName, tuple[Status, PhaseSkipReason | None]] | dict[Unknown, tuple[Status, None]]]` is not assignable to `dict[PhaseName, tuple[Status, PhaseSkipReason | None]]`
+ src/schemathesis/specs/openapi/adapter/parameters.py:1139:45: error[invalid-argument-type] Argument to bound method `map` is incorrect: Expected `(GeneratedValue, /) -> Unknown`, found `def _quote_all_safe(value: dict[str, Any]) -> dict[str, Any]`
+ src/schemathesis/specs/openapi/adapter/parameters.py:1148:48: error[invalid-argument-type] Argument to bound method `filter` is incorrect: Expected `(GeneratedValue, /) -> Any`, found `def is_valid_query(query: dict[str, object]) -> bool`
+ src/schemathesis/specs/openapi/adapter/parameters.py:1152: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]`
+ src/schemathesis/specs/openapi/adapter/parameters.py:1160:52: error[invalid-argument-type] Argument to bound method `filter` is incorrect: Expected `(GeneratedValue, /) -> Any`, found `def is_valid_header(headers: dict[str, object]) -> bool`
- Found 343 diagnostics
+ Found 348 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`

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: Any) -> 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: Any) -> 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: Any) -> 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: Literal["original error"]) -> Result[Any, str]`
- Found 210 diagnostics
+ Found 214 diagnostics

mitmproxy (https://github.com/mitmproxy/mitmproxy)
- mitmproxy/tools/console/commands.py:109:38: error[invalid-argument-type] Argument to bound method `connect` is incorrect: Expected `(text) -> None`, found `bound method Self@__init__.sig_mod(txt) -> Unknown`
+ mitmproxy/tools/console/commands.py:109:38: error[invalid-argument-type] Argument to bound method `connect` is incorrect: Expected `(text: UnspecializedTypeVar) -> None`, found `bound method Self@__init__.sig_mod(txt) -> Unknown`

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 607 diagnostics
+ Found 604 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[Unknown | None, ...], tuple[Unknown | None, ...]]`
- torchvision/transforms/v2/_auto_augment.py:423:75: error[invalid-argument-type] Argument to bound method `_get_random_item` is incorrect: Expected `dict[str, tuple[(...) -> Unknown, bool]]`, found `Unknown | dict[str, tuple[(num_bins, height, width) -> Unknown, bool]]`
+ torchvision/transforms/v2/_auto_augment.py:423:75: error[invalid-argument-type] Argument to bound method `_get_random_item` is incorrect: Expected `dict[str, tuple[(...) -> Unknown, bool]]`, found `Unknown | dict[str, tuple[(num_bins, height, width) -> None, bool] | tuple[(num_bins, height, width) -> Unknown, bool]]`
- torchvision/transforms/v2/_auto_augment.py:491:71: error[invalid-argument-type] Argument to bound method `_get_random_item` is incorrect: Expected `dict[str, tuple[(...) -> Unknown, bool]]`, found `Unknown | dict[str, tuple[(num_bins, height, width) -> Unknown, bool]]`
+ torchvision/transforms/v2/_auto_augment.py:491:71: error[invalid-argument-type] Argument to bound method `_get_random_item` is incorrect: Expected `dict[str, tuple[(...) -> Unknown, bool]]`, found `Unknown | dict[str, tuple[(num_bins, height, width) -> None, bool] | tuple[(num_bins, height, width) -> Unknown, bool]]`
- torchvision/transforms/v2/_auto_augment.py:612:79: error[invalid-argument-type] Argument to bound method `_get_random_item` is incorrect: Expected `dict[str, tuple[(...) -> Unknown, bool]]`, found `dict[str, tuple[(int, int, int, /) -> Unknown | None, bool]] | Unknown | dict[str, tuple[(num_bins, height, width) -> Unknown, bool]]`
+ torchvision/transforms/v2/_auto_augment.py:612:79: error[invalid-argument-type] Argument to bound method `_get_random_item` is incorrect: Expected `dict[str, tuple[(...) -> Unknown, bool]]`, found `dict[str, tuple[(int, int, int, /) -> Unknown | None, bool]] | Unknown | dict[str, tuple[(num_bins, height, width) -> Unknown, bool] | tuple[(num_bins, height, width) -> None, bool]]`
- Found 1414 diagnostics
+ Found 1415 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 87 diagnostics
+ Found 88 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`

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`

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 469 diagnostics
+ Found 466 diagnostics

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 `UnspecializedTypeVar | Handler`
+ cloudinit/cmd/main.py:999:34: error[unresolved-attribute] Attribute `export_logs` is not defined on `Handler` in union `UnspecializedTypeVar | Handler`
+ cloudinit/cmd/main.py:1000:9: error[unresolved-attribute] Attribute `clean_logs` is not defined on `Handler` in union `UnspecializedTypeVar | Handler`
- 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`
+ tests/unittests/test_url_helper.py:518:31: warning[division-by-zero] Cannot divide object of type `Literal[1]` by zero
+ tests/unittests/test_url_helper.py:527:31: warning[division-by-zero] Cannot divide object of type `Literal[1]` by zero
+ tests/unittests/test_url_helper.py:585:32: warning[division-by-zero] Cannot divide object of type `Literal[1]` by zero
+ tests/unittests/test_url_helper.py:593:32: warning[division-by-zero] Cannot divide object of type `Literal[1]` by zero
- Found 1318 diagnostics
+ Found 1325 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`

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/backend/ninjabackend.py:1943:34: error[invalid-assignment] Object of type `str | Unknown` is not assignable to `Literal["2015", "2018", "2021"]`
+ mesonbuild/backend/ninjabackend.py:1943:34: error[invalid-assignment] Object of type `str` is not assignable to `Literal["2015", "2018", "2021"]`
+ mesonbuild/build.py:1108:9: error[invalid-assignment] Object of type `OrderedDict[str, Compiler]` is not assignable to attribute `compilers` of type `dict[Literal["c", "cpp", "cuda", "fortran", "d", ... omitted 11 literals], Compiler]`
+ mesonbuild/cargo/manifest.py:339:38: error[invalid-assignment] Object of type `dataclasses.Field[list[Literal["bin", "lib", "dylib", "staticlib", "cdylib", "rlib", "proc-macro"]] | list[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 `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[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[str]` is not assignable to attribute `get_default_include_dirs` of type `def get_default_include_dirs(self) -> list[str]`
+ unittests/machinefiletests.py:186:26: error[unresolved-attribute] Attribute `id` is not defined on `None` in union `Compiler | None`
- Found 2354 diagnostics
+ Found 2356 diagnostics

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`

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 1691 diagnostics
+ Found 1689 diagnostics

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`
- Found 514 diagnostics
+ Found 515 diagnostics

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`

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/cli/flow_run.py:264:17: error[unresolved-attribute] Attribute `state_details` is not defined on `None` in union `State[Any] | None | Unknown`
+ src/prefect/cli/flow_run.py:264:17: error[unresolved-attribute] Attribute `state_details` is not defined on `None` in union `State[Any] | None | UnspecializedTypeVar`
- src/prefect/cli/flow_run.py:265:20: error[unresolved-attribute] Attribute `is_scheduled` is not defined on `None` in union `State[Any] | None | Unknown`
+ src/prefect/cli/flow_run.py:265:20: error[unresolved-attribute] Attribute `is_scheduled` is not defined on `None` in union `State[Any] | None | UnspecializedTypeVar`
- src/prefect/cli/flow_run.py:266:22: error[unresolved-attribute] Attribute `timestamp` is not defined on `None` in union `State[Any] | None | Unknown`
+ src/prefect/cli/flow_run.py:266:22: error[unresolved-attribute] Attribute `timestamp` is not defined on `None` in union `State[Any] | None | UnspecializedTypeVar`
- src/prefect/cli/flow_run.py:272:21: error[unresolved-attribute] Attribute `type` is not defined on `None` in union `State[Any] | None | Unknown`
+ src/prefect/cli/flow_run.py:272:21: error[unresolved-attribute] Attribute `type` is not defined on `None` in union `State[Any] | None | UnspecializedTypeVar`

openlibrary (https://github.com/internetarchive/openlibrary)
- openlibrary/book_providers.py:864:9: error[invalid-argument-type] Argument to function `multisort_best` is incorrect: Expected `list[tuple[Literal["min", "max"], (tuple[Edition, AbstractBookProvider[Unknown] | None] | Unknown, /) -> int | float]]`, found `list[tuple[str, (rec) -> Unknown]]`
+ openlibrary/book_providers.py:864:9: error[invalid-argument-type] Argument to function `multisort_best` is incorrect: Expected `list[tuple[Literal["min", "max"], (tuple[Edition, AbstractBookProvider[Unknown] | None] | Unknown, /) -> int | float]]`, found `list[tuple[str, (rec) -> int | float]]`
- openlibrary/conftest.py:155:5: error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `init_plugin` of type `def init_plugin() -> Unknown`
+ openlibrary/conftest.py:155:5: error[invalid-assignment] Object of type `() -> None` is not assignable to attribute `init_plugin` of type `def init_plugin() -> Unknown`

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:1424:20: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ pwndbg/aglib/heap/ptmalloc.py:1425:20: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ pwndbg/aglib/heap/ptmalloc.py:1426:28: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ pwndbg/aglib/heap/ptmalloc.py:1427:28: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- pwndbg/aglib/onegadget.py:233:49: error[invalid-argument-type] Argument to function `generateColorFunction` is incorrect: Expected `dict[str, (str, /) -> str]`, found `dict[str, (x) -> Unknown]`
+ pwndbg/aglib/onegadget.py:233:49: error[invalid-argument-type] Argument to function `generateColorFunction` is incorrect: Expected `dict[str, (str, /) -> str]`, found `dict[str, (x) -> str]`
- pwndbg/aglib/onegadget.py:237:50: error[invalid-argument-type] Argument to function `generateColorFunction` is incorrect: Expected `dict[str, (str, /) -> str]`, found `dict[str, (x) -> Unknown]`
+ pwndbg/aglib/onegadget.py:237:50: error[invalid-argument-type] Argument to function `generateColorFunction` is incorrect: Expected `dict[str, (str, /) -> str]`, found `dict[str, (x) -> str]`
+ pwndbg/emu/emulator.py:551:36: error[invalid-assignment] Object of type `tuple[str | Unknown, ...]` is not assignable to `tuple[str]`
- 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 1871 diagnostics
+ Found 1877 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: int, s) -> bytes`

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 57 diagnostics
+ Found 58 diagnostics

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- ddtrace/debugging/_debugger.py:283:13: error[invalid-argument-type] Argument is incorrect: Expected `int | float`, found `Unknown | DerivedVariable[int | float | Unknown]`
+ ddtrace/debugging/_debugger.py:283: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 | Unknown | DerivedVariable[str]]`
- 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: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 | Unknown | DerivedVariable[str]]`
- ddtrace/internal/symbol_db/symbols.py:586: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:586: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:604: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:604:36: error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Pattern[str]]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Pattern[str]]`
+ ddtrace/vendor/xmltodict.py:114:5: error[invalid-assignment] Object of type `(*x: str) -> Literal[1]` is not assignable to attribute `ExternalEntityRefHandler` of type `((str, str | None, str | None, str | None, /) -> int) | None`
+ tests/appsec/appsec/test_asm_request_context.py:102: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/exploration/debugger.py:32:5: error[invalid-assignment] Object of type `(f) -> Unknown` is not assignable to attribute `capture_stack` of type `def capture_stack(top_frame: FrameType, max_height: int = 4096) -> list[dict[Unknown, Unknown]]`
+ tests/debugging/exploration/debugger.py:32:5: error[invalid-assignment] Object of type `(f) -> list[dict[str, int]]` is not assignable to attribute `capture_stack` of type `def capture_stack(top_frame: FrameType, max_height: int = 4096) -> list[dict[Unknown, Unknown]]`
- 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`
- Found 9356 diagnostics
+ Found 9358 diagnostics

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/client_reqrep.py:211:66: error[invalid-assignment] Object of type `(*_: ClientResponse) -> Literal["utf-8"]` is not assignable to `(ClientResponse, bytes, /) -> str`
- Found 197 diagnostics
+ Found 198 diagnostics

egglog-python (https://github.com/egraphs-good/egglog-python)
+ python/egglog/declarations.py:169:65: error[invalid-assignment] Object of type `dataclasses.Field[dict[Ident, RulesetDecl | CombinedRulesetDecl] | dict[Ident, RulesetDecl]]` is not assignable to `dict[Ident, RulesetDecl | CombinedRulesetDecl]`
+ python/egglog/egraph_state.py:59:60: error[invalid-assignment] Object of type `dataclasses.Field[defaultdict[str, set[FunctionRef]]]` is not assignable to `dict[str, set[FunctionRef | ConstantRef | MethodRef | ... omitted 5 union elements]]`
+ python/egglog/egraph_state.py:62:67: error[invalid-assignment] Object of type `dataclasses.Field[dict[FunctionRef | ConstantRef | MethodRef | ... omitted 5 union elements, tuple[str, bool]] | dict[FunctionRef, tuple[str, bool]]]` is not assignable to `dict[FunctionRef | ConstantRef | MethodRef | ... omitted 5 union elements, tuple[str, bool]]`
- Found 1475 diagnostics
+ Found 1478 diagnostics

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

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: Any) -> list[LegendItem]`
+ src/bokeh/models/layouts.py:587:18: error[invalid-argument-type] Argument to bound method `accepts` is incorrect: Expected `(Any, /) -> TabPanel`, found `(items: Any) -> list[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 863 diagnostics
+ Found 865 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`

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:1027:33: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/hazmat/primitives/test_ec.py:1043:35: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/hazmat/primitives/test_ec.py:1059:33: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/hazmat/primitives/test_ec.py:1333:33: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/hazmat/primitives/test_ec.py:1381:35: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/hazmat/primitives/test_ec.py:1616:51: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 37 diagnostics
+ Found 28 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`
- manticore/utils/event.py:37:40: error[unresolved-attribute] Attribute `_published_events` is not defined on `type` in union `Unknown | type`
+ manticore/utils/event.py:37:40: error[unresolved-attribute] Attribute `_published_events` is not defined on `type` in union `UnspecializedTypeVar | type`

static-frame (https://github.com/static-frame/static-frame)
- static_frame/test/unit/test_bus.py:2069:36: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str, (l, v) -> Unknown]`, found `dict[Hashable, (l, v) -> Unknown]`
+ static_frame/test/unit/test_bus.py:2069:36: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str, (l: Any, v: Any) -> Unknown]`, found `dict[Hashable, (l: Any, v: Any) -> Unknown]`
- static_frame/test/unit/test_bus.py:2102:17: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str, (l, v) -> Unknown]`, found `dict[Hashable, (l, v) -> Unknown]`
+ static_frame/test/unit/test_bus.py:2102:17: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str, (l: Any, v: Any) -> Unknown]`, found `dict[Hashable, (l: Any, v: Any) -> Unknown]`
- static_frame/test/unit/test_bus.py:2163:17: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str, (l, v) -> Unknown]`, found `dict[Hashable, (l, v) -> Unknown]`
+ static_frame/test/unit/test_bus.py:2163:17: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str, (l: Any, v: Any) -> Unknown]`, found `dict[Hashable, (l: Any, v: Any) -> Unknown]`

pandas (https://github

... (truncated 273 lines) ...

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Jan 16, 2026

ecosystem-analyzer results

Lint rule Added Removed Changed
invalid-argument-type 88 16 87
invalid-assignment 6 0 68
invalid-await 41 0 0
unresolved-attribute 7 0 28
unsupported-operator 9 0 2
no-matching-overload 7 0 0
invalid-return-type 3 0 2
type-assertion-failure 0 5 0
unused-type-ignore-comment 0 5 0
not-subscriptable 4 0 0
index-out-of-bounds 0 0 1
Total 165 26 188

Changes in flaky projects detected. Raw diff output excludes flaky projects; see the HTML report for details.

Showing a random sample of 193 of 332 changes. See the HTML report for the full diff.

Raw diff sample (193 of 332 changes)
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: Any) -> str`

asynq (https://github.com/quora/asynq)
- 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`

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_validators.py:468:52 error[invalid-argument-type] Argument to function `include` is incorrect: Expected `type | str | Attribute[Any]`, found `(val) -> Unknown`
+ tests/test_validators.py:468:52 error[invalid-argument-type] Argument to function `include` is incorrect: Expected `type | str | Attribute[Any]`, found `(val) -> Literal[True]`

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: 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/layouts.py:587:18 error[invalid-argument-type] Argument to bound method `accepts` is incorrect: Expected `(Any, /) -> TabPanel`, found `(items: Any) -> list[TabPanel]`
- 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: 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`

cloud-init (https://github.com/canonical/cloud-init)
+ cloudinit/cmd/main.py:999:34 error[unresolved-attribute] Attribute `export_logs` is not defined on `Handler` in union `UnspecializedTypeVar | Handler`
+ cloudinit/cmd/main.py:1000:9 error[unresolved-attribute] Attribute `clean_logs` is not defined on `Handler` in union `UnspecializedTypeVar | Handler`
- 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: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`

core (https://github.com/home-assistant/core)
+ homeassistant/components/zabbix/__init__.py:107:13 error[invalid-argument-type] Argument is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `(_: datetime) -> bool`

cryptography (https://github.com/pyca/cryptography)
+ tests/hazmat/primitives/test_dsa.py:940:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_dsa.py:940:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_dsa.py:940:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_dsa.py:940:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_dsa.py:940:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_dsa.py:955:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `PrivateFormat`, found `Literal["invalidformat"]`
+ tests/hazmat/primitives/test_dsa.py:955:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `PrivateFormat`, found `Literal["invalidformat"]`
+ tests/hazmat/primitives/test_dsa.py:955:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `PrivateFormat`, found `Literal["invalidformat"]`
+ tests/hazmat/primitives/test_dsa.py:955:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `PrivateFormat`, found `Literal["invalidformat"]`
+ tests/hazmat/primitives/test_dsa.py:970:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `KeySerializationEncryption`, found `Literal["notanencalg"]`
+ tests/hazmat/primitives/test_dsa.py:970:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `KeySerializationEncryption`, found `Literal["notanencalg"]`
+ tests/hazmat/primitives/test_dsa.py:970:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `KeySerializationEncryption`, found `Literal["notanencalg"]`
+ tests/hazmat/primitives/test_dsa.py:970:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `KeySerializationEncryption`, found `Literal["notanencalg"]`
+ tests/hazmat/primitives/test_dsa.py:970:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `KeySerializationEncryption`, found `Literal["notanencalg"]`
+ tests/hazmat/primitives/test_dsa.py:970:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `KeySerializationEncryption`, found `Literal["notanencalg"]`
+ tests/hazmat/primitives/test_dsa.py:970:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `KeySerializationEncryption`, found `Literal["notanencalg"]`
+ tests/hazmat/primitives/test_ec.py:1027:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_ec.py:1027:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_ec.py:1027:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_ec.py:1027:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_ec.py:1027:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_ec.py:1027:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_ec.py:1027:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_ec.py:1043:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `PrivateFormat`, found `Literal["invalidformat"]`
+ tests/hazmat/primitives/test_ec.py:1043:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `PrivateFormat`, found `Literal["invalidformat"]`
+ tests/hazmat/primitives/test_ec.py:1043:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `PrivateFormat`, found `Literal["invalidformat"]`
+ tests/hazmat/primitives/test_ec.py:1043:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `PrivateFormat`, found `Literal["invalidformat"]`
+ tests/hazmat/primitives/test_ec.py:1059:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `KeySerializationEncryption`, found `Literal["notanencalg"]`
+ tests/hazmat/primitives/test_ec.py:1059:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `KeySerializationEncryption`, found `Literal["notanencalg"]`
+ tests/hazmat/primitives/test_ec.py:1059:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `KeySerializationEncryption`, found `Literal["notanencalg"]`
+ tests/hazmat/primitives/test_ec.py:1059:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `KeySerializationEncryption`, found `Literal["notanencalg"]`
+ tests/hazmat/primitives/test_ec.py:1059:17 error[invalid-argument-type] Argument to bound method `private_bytes` is incorrect: Expected `KeySerializationEncryption`, found `Literal["notanencalg"]`
+ tests/hazmat/primitives/test_ec.py:1333:17 error[invalid-argument-type] Argument to bound method `public_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_ec.py:1333:17 error[invalid-argument-type] Argument to bound method `public_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_ec.py:1333:17 error[invalid-argument-type] Argument to bound method `public_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_ec.py:1333:17 error[invalid-argument-type] Argument to bound method `public_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_ec.py:1333:17 error[invalid-argument-type] Argument to bound method `public_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_ec.py:1333:17 error[invalid-argument-type] Argument to bound method `public_bytes` is incorrect: Expected `Encoding`, found `Literal["notencoding"]`
+ tests/hazmat/primitives/test_ec.py:1381:17 error[invalid-argument-type] Argument to bound method `public_bytes` is incorrect: Expected `PublicFormat`, found `Literal["invalidformat"]`
+ tests/hazmat/primitives/test_ec.py:1381:17 error[invalid-argument-type] Argument to bound method `public_bytes` is incorrect: Expected `PublicFormat`, found `Literal["invalidformat"]`
+ tests/hazmat/primitives/test_ec.py:1381:17 error[invalid-argument-type] Argument to bound method `public_bytes` is incorrect: Expected `PublicFormat`, found `Literal["invalidformat"]`

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- ddtrace/debugging/_debugger.py:283:13 error[invalid-argument-type] Argument is incorrect: Expected `int | float`, found `Unknown | DerivedVariable[int | float | Unknown]`
+ ddtrace/debugging/_debugger.py:283: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 | Unknown | DerivedVariable[str]]`
- 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: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 | Unknown | DerivedVariable[str]]`
- ddtrace/internal/symbol_db/symbols.py:604: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:604:36 error[unresolved-attribute] Attribute `match` is not defined on `DerivedVariable[Pattern[Unknown] | Pattern[str]]` in union `Unknown | DerivedVariable[Pattern[Unknown] | Pattern[str]]`
- 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/exploration/debugger.py:32:5 error[invalid-assignment] Object of type `(f) -> Unknown` is not assignable to attribute `capture_stack` of type `def capture_stack(top_frame: FrameType, max_height: int = 4096) -> list[dict[Unknown, Unknown]]`
+ tests/debugging/exploration/debugger.py:32:5 error[invalid-assignment] Object of type `(f) -> list[dict[str, int]]` is not assignable to attribute `capture_stack` of type `def capture_stack(top_frame: FrameType, max_height: int = 4096) -> list[dict[Unknown, Unknown]]`
- 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]]`

discord.py (https://github.com/Rapptz/discord.py)
- 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`

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 `if_` is incorrect: Expected `() -> NDArray`, found `() -> Value | Unknown | Int`

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

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`

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`

ignite (https://github.com/pytorch/ignite)
+ 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: Engine) -> dict[str, int]`

jax (https://github.com/google/jax)
- jax/_src/ad_checkpoint.py:801:16 error[unresolved-attribute] Unresolved attribute `in_cts_zero` on type `() -> Unknown`
+ jax/_src/ad_checkpoint.py:801:16 error[unresolved-attribute] Unresolved attribute `in_cts_zero` on type `() -> None`
- jax/_src/ad_checkpoint.py:810:28 error[unresolved-attribute] Object of type `() -> Unknown` has no attribute `in_cts_zero`
+ jax/_src/ad_checkpoint.py:810:28 error[unresolved-attribute] Object of type `() -> None` has no attribute `in_cts_zero`
- jax/_src/hijax.py:508:7 error[unresolved-attribute] Unresolved attribute `out_nzs` on type `() -> Unknown`
+ jax/_src/hijax.py:508:7 error[unresolved-attribute] Unresolved attribute `out_nzs` on type `() -> None`
- jax/_src/hijax.py:611:1 error[invalid-assignment] Object of type `(*args, *, _prim, **_) -> Unknown` is not assignable to attribute `is_high` of type `def is_high(self, *avals, **params) -> bool`
+ jax/_src/hijax.py:611:1 error[invalid-assignment] Object of type `(*args, *, _prim, **_) -> Literal[True]` is not assignable to attribute `is_high` of type `def is_high(self, *avals, **params) -> bool`
- jax/_src/pallas/mosaic_gpu/lowering.py:3667:22 error[invalid-argument-type] Argument to function `safe_map` is incorrect: Expected `(Any, dtype[Any] | Unknown | ShapedAbstractValue, /) -> Unknown`, found `(def _ensure_ir_value(x: Any, dtype: dtype[Any]) -> Unknown) | ((v, aval) -> Unknown)`
+ jax/_src/pallas/mosaic_gpu/lowering.py:3667:22 error[invalid-argument-type] Argument to function `safe_map` is incorrect: Expected `(Any, dtype[Any] | Unknown | ShapedAbstractValue, /) -> Unknown | FragmentedArray`, found `(def _ensure_ir_value(x: Any, dtype: dtype[Any]) -> Unknown) | ((v, aval) -> Unknown | FragmentedArray)`
+ jax/_src/pallas/pipelining/schedulers.py:123:7 error[invalid-assignment] Invalid subscript assignment with key of type `int | str` and value of type `int` on object of type `defaultdict[Unknown, None]`
+ jax/_src/pallas/pipelining/schedulers.py:159:16 error[invalid-argument-type] Argument is incorrect: Expected `Mapping[int | str, int]`, found `defaultdict[Unknown, None]`
- jax/_src/test_loader.py:157:9 error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `time_getter` on type `Unknown | TestResult`
+ jax/_src/test_loader.py:157:9 error[invalid-assignment] Object of type `() -> int | float` is not assignable to attribute `time_getter` on type `Unknown | TestResult`
+ jax/experimental/jet.py:469:16 error[unsupported-operator] Operator `*` is not supported between objects of type `int` and `None | Unknown | Array`
+ jax/experimental/jet.py:484:14 error[unsupported-operator] Operator `*` is not supported between objects of type `int` and `None | Unknown | Array`

jinja (https://github.com/pallets/jinja)
- tests/test_ext.py:291:9 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["gettext"]` and value of type `(x) -> Unknown` on object of type `dict[str, <class 'range'> | <class 'dict'> | ((n: int = 5, html: bool = True, min: int = 20, max: int = 100) -> str) | ... omitted 3 union elements]`
+ tests/test_ext.py:291:9 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["gettext"]` and value of type `(x: int) -> Unknown` on object of type `dict[str, <class 'range'> | <class 'dict'> | ((n: int = 5, html: bool = True, min: int = 20, max: int = 100) -> str) | ... omitted 3 union elements]`
- tests/test_regression.py:354:9 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["get_int"]` and value of type `() -> Unknown` on object of type `dict[str, <class 'range'> | <class 'dict'> | ((n: int = 5, html: bool = True, min: int = 20, max: int = 100) -> str) | ... omitted 3 union elements]`
+ tests/test_regression.py:354:9 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["get_int"]` and value of type `() -> Literal[42]` on object of type `dict[str, <class 'range'> | <class 'dict'> | ((n: int = 5, html: bool = True, min: int = 20, max: int = 100) -> str) | ... omitted 3 union elements]`

materialize (https://github.com/MaterializeInc/materialize)
- misc/python/materialize/cli/scratch/__main__.py:99:19 error[index-out-of-bounds] Index 4 is out of bounds for tuple `tuple[str, (p) -> Unknown, () -> Unknown, str]` with length 4
+ misc/python/materialize/cli/scratch/__main__.py:99:19 error[index-out-of-bounds] Index 4 is out of bounds for tuple `tuple[str, (p) -> Unknown, () -> None, str]` with length 4

meson (https://github.com/mesonbuild/meson)
- mesonbuild/backend/ninjabackend.py:1943:34 error[invalid-assignment] Object of type `str | Unknown` is not assignable to `Literal["2015", "2018", "2021"]`
+ mesonbuild/backend/ninjabackend.py:1943:34 error[invalid-assignment] Object of type `str` is not assignable to `Literal["2015", "2018", "2021"]`
- unittests/internaltests.py:279: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:279:9 error[invalid-assignment] Object of type `() -> list[str]` is not assignable to attribute `get_default_include_dirs` of type `def get_default_include_dirs(self) -> list[str]`
+ unittests/machinefiletests.py:186:26 error[unresolved-attribute] Attribute `id` is not defined on `None` in union `Compiler | None`

mitmproxy (https://github.com/mitmproxy/mitmproxy)
- mitmproxy/tools/console/commands.py:109:38 error[invalid-argument-type] Argument to bound method `connect` is incorrect: Expected `(text) -> None`, found `bound method Self@__init__.sig_mod(txt) -> Unknown`
+ mitmproxy/tools/console/commands.py:109:38 error[invalid-argument-type] Argument to bound method `connect` is incorrect: Expected `(text: UnspecializedTypeVar) -> None`, found `bound method Self@__init__.sig_mod(txt) -> Unknown`

openlibrary (https://github.com/internetarchive/openlibrary)
- openlibrary/book_providers.py:864:9 error[invalid-argument-type] Argument to function `multisort_best` is incorrect: Expected `list[tuple[Literal["min", "max"], (tuple[Edition, AbstractBookProvider[Unknown] | None] | Unknown, /) -> int | float]]`, found `list[tuple[str, (rec) -> Unknown]]`
+ openlibrary/book_providers.py:864:9 error[invalid-argument-type] Argument to function `multisort_best` is incorrect: Expected `list[tuple[Literal["min", "max"], (tuple[Edition, AbstractBookProvider[Unknown] | None] | Unknown, /) -> int | float]]`, found `list[tuple[str, (rec) -> int | float]]`

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 | Unknown]]`
+ 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/io/pytables.py:2290:23 error[invalid-assignment] Object of type `(x, **kwds) -> Unknown` is not assignable to `type[Index]`
+ pandas/io/pytables.py:2290:23 error[invalid-assignment] Object of type `(x, **kwds) -> PeriodIndex` is not assignable to `type[Index]`
- pandas/tests/io/formats/test_to_latex.py:953:30 error[invalid-argument-type] Argument to bound method `to_latex` is incorrect: Expected `list[(...) -> Unknown] | tuple[(...) -> Unknown, ...] | Mapping[str | int, (...) -> Unknown] | None`, found `dict[str, (x) -> Unknown]`
+ pandas/tests/io/formats/test_to_latex.py:953:30 error[invalid-argument-type] Argument to bound method `to_latex` is incorrect: Expected `list[(...) -> Unknown] | tuple[(...) -> Unknown, ...] | Mapping[str | int, (...) -> Unknown] | None`, found `dict[str, ((x) -> Unknown) | ((x) -> str)]`
- 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`

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
- tests/series/test_series.py:812:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
- tests/series/test_series.py:2220:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
- tests/series/test_series.py:2276:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
- tests/series/test_series.py:2823:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[BaseOffset]`
- tests/test_pandas.py:257:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `DataFrame`

poetry (https://github.com/python-poetry/poetry)
- src/poetry/repositories/installed_repository.py:268:33 error[unresolved-attribute] Attribute `_path` is not defined on `Distribution` in union `Distribution | Unknown`
+ src/poetry/repositories/installed_repository.py:268:33 error[unresolved-attribute] Attribute `_path` is not defined on `Distribution` in union `Distribution | UnspecializedTypeVar`
- tests/puzzle/test_provider.py:988:5 error[invalid-assignment] Object of type `(name, version) -> Unknown` is not assignable to attribute `_get_release_info` of type `def _get_release_info(self, name: NormalizedName, version: Unknown) -> dict[str, Any]`
+ tests/puzzle/test_provider.py:988:5 error[invalid-assignment] Object of type `(name, version) -> dict[str, Any]` is not assignable to attribute `_get_release_info` of type `def _get_release_info(self, name: NormalizedName, version: Unknown) -> dict[str, Any]`
- tests/repositories/test_cached_repository.py:67:5 error[invalid-assignment] Object of type `(name, version) -> Unknown` is not assignable to attribute `_get_release_info` of type `def _get_release_info(self, name: NormalizedName, version: Unknown) -> dict[str, Any]`
+ tests/repositories/test_cached_repository.py:67:5 error[invalid-assignment] Object of type `(name, version) -> dict[str, Any]` is not assignable to attribute `_get_release_info` of type `def _get_release_info(self, name: NormalizedName, version: Unknown) -> dict[str, Any]`

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:1427:28 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- pwndbg/aglib/onegadget.py:233:49 error[invalid-argument-type] Argument to function `generateColorFunction` is incorrect: Expected `dict[str, (str, /) -> str]`, found `dict[str, (x) -> Unknown]`
+ pwndbg/aglib/onegadget.py:233:49 error[invalid-argument-type] Argument to function `generateColorFunction` is incorrect: Expected `dict[str, (str, /) -> str]`, found `dict[str, (x) -> str]`
- 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`

pyodide (https://github.com/pyodide/pyodide)
- src/py/_pyodide/_base.py:312:9 error[invalid-assignment] Invalid subscript assignment with key of type `str` and value of type `list[() -> Unknown]` on object of type `dict[str, tuple[() -> str | None] | tuple[int, int | float | None, list[str], str]]`
+ src/py/_pyodide/_base.py:312:9 error[invalid-assignment] Invalid subscript assignment with key of type `str` and value of type `list[() -> Unknown | str]` on object of type `dict[str, tuple[() -> str | None] | tuple[int, int | float | None, list[str], str]]`

pytest (https://github.com/pytest-dev/pytest)
- src/_pytest/junitxml.py:258:9 error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `to_xml` of type `def to_xml(self) -> Element[Unknown]`
+ src/_pytest/junitxml.py:258:9 error[invalid-assignment] Object of type `() -> Element[Unknown]` is not assignable to attribute `to_xml` of type `def to_xml(self) -> Element[Unknown]`

rotki (https://github.com/rotki/rotki)
- rotkehlchen/chain/evm/decoding/velodrome/decoder.py:561:17 error[invalid-assignment] Invalid subscript assignment with key of type `ChecksumAddress` and value of type `tuple[(context) -> Unknown]` on object of type `dict[Unknown | ChecksumAddress, tuple[bound method Self@addresses_to_decoders._decode_voting_escrow_events(context: DecoderContext) -> EvmDecodingOutput] | tuple[bound method Self@addresses_to_decoders._decode_vote_events(context: DecoderContext) -> EvmDecodingOutput]]`
+ rotkehlchen/chain/evm/decoding/velodrome/decoder.py:561:17 error[invalid-assignment] Invalid subscript assignment with key of type `ChecksumAddress` and value of type `tuple[(context) -> EvmDecodingOutput]` on object of type `dict[Unknown | ChecksumAddress, tuple[bound method Self@addresses_to_decoders._decode_voting_escrow_events(context: DecoderContext) -> EvmDecodingOutput] | tuple[bound method Self@addresses_to_decoders._decode_vote_events(context: DecoderContext) -> EvmDecodingOutput]]`
- rotkehlchen/chain/evm/decoding/velodrome/decoder.py:567:17 error[invalid-assignment] Invalid subscript assignment with key of type `ChecksumAddress` and value of type `tuple[(context) -> Unknown]` on object of type `dict[Unknown | ChecksumAddress, tuple[bound method Self@addresses_to_decoders._decode_voting_escrow_events(context: DecoderContext) -> EvmDecodingOutput] | tuple[bound method Self@addresses_to_decoders._decode_vote_events(context: DecoderContext) -> EvmDecodingOutput]]`
+ rotkehlchen/chain/evm/decoding/velodrome/decoder.py:567:17 error[invalid-assignment] Invalid subscript assignment with key of type `ChecksumAddress` and value of type `tuple[(context) -> EvmDecodingOutput]` on object of type `dict[Unknown | ChecksumAddress, tuple[bound method Self@addresses_to_decoders._decode_voting_escrow_events(context: DecoderContext) -> EvmDecodingOutput] | tuple[bound method Self@addresses_to_decoders._decode_vote_events(context: DecoderContext) -> EvmDecodingOutput]]`
+ rotkehlchen/chain/solana/decoding/decoder.py:627:21 error[invalid-argument-type] Argument to function `decode_safely` is incorrect: Expected `tuple[Any]`, found `SolanaEventDecoderContext | SolanaDecoderContext`

schemathesis (https://github.com/schemathesis/schemathesis)
+ src/schemathesis/specs/openapi/adapter/parameters.py:1139:45 error[invalid-argument-type] Argument to bound method `map` is incorrect: Expected `(GeneratedValue, /) -> Unknown`, found `def _quote_all_safe(value: dict[str, Any]) -> dict[str, Any]`

scikit-build-core (https://github.com/scikit-build/scikit-build-core)
- src/scikit_build_core/setuptools/build_cmake.py:228:5 error[invalid-assignment] Object of type `() -> Unknown` is not assignable to attribute `has_ext_modules` of type `def has_ext_modules(self) -> bool`
+ src/scikit_build_core/setuptools/build_cmake.py:228:5 error[invalid-assignment] Object of type `() -> bool` is not assignable to attribute `has_ext_modules` of type `def has_ext_modules(self) -> bool`

scipy (https://github.com/scipy/scipy)
+ scipy/stats/_kde.py:606:51 error[unsupported-operator] Operator `**` is not supported between objects of type `Unknown | (generic[Any] & ~str) | int | ... omitted 4 union elements` and `Literal[2]`
+ scipy/stats/_kde.py:621:52 error[unsupported-operator] Operator `**` is not supported between objects of type `Unknown | (generic[Any] & ~str) | int | ... omitted 4 union elements` and `Literal[2]`
+ scipy/stats/_sampling.py:698:16 error[unsupported-operator] Operator `<` is not supported between objects of type `(Unknown & ~None) | int | float | ... omitted 5 union elements` and `Any | int | float`
+ scipy/stats/_sampling.py:700:18 error[unsupported-operator] Operator `>` is not supported between objects of type `(Unknown & ~None) | int | float | ... omitted 5 union elements` and `Any | int | float`
+ scipy/stats/_sampling.py:921:20 error[unresolved-attribute] Attribute `squeeze` is not defined on `int`, `float` in union `Unknown | int | float`
+ scipy/stats/_sampling.py:926:24 error[unresolved-attribute] Attribute `reshape` is not defined on `int`, `float` in union `Unknown | int | float`
- scipy/stats/_sampling.py:707:13 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `None | int | float`, found `None | Unknown | generic[Any] | ... omitted 6 union elements`
+ scipy/stats/_sampling.py:707:13 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `None | int | float`, found `None | Unknown | int | ... omitted 6 union elements`
- scipy/stats/tests/test_sampling.py:525:5 error[unsupported-operator] Operator `+=` is not supported between objects of type `list[tuple[(x) -> Unknown, <class 'UNURANError'>, str]]` and `list[tuple[(x) -> Unknown, <class 'UNURANError'>, str] | tuple[(x) -> Unknown, <class 'TypeError'>, str] | tuple[(x) -> Unknown, <class 'NameError'>, str] | tuple[() -> Unknown, <class 'TypeError'>, str]]`
+ scipy/stats/tests/test_sampling.py:525:5 error[unsupported-operator] Operator `+=` is not supported between objects of type `list[tuple[(x) -> int, <class 'UNURANError'>, str]]` and `list[tuple[(x) -> Unknown, <class 'UNURANError'>, str] | tuple[(x) -> list[Unknown], <class 'TypeError'>, str] | tuple[(x) -> Unknown, <class 'NameError'>, str] | tuple[(x) -> int | float, <class 'UNURANError'>, str] | tuple[() -> int | float, <class 'TypeError'>, str]]`
- subprojects/cobyqa/cobyqa/main.py:1505:26 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["-", "+", " "] | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/main.py:1505:26 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["-", "+", " "] | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/main.py:1505:26 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["fixed", "unique", "maxprec", "maxprec_equal"] | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/main.py:1505:26 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["fixed", "unique", "maxprec", "maxprec_equal"] | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/main.py:1505:26 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `SupportsIndex | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/main.py:1505:26 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `SupportsIndex | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/main.py:1505:26 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `bool | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/main.py:1505:26 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `bool | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/main.py:1505:26 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `int | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/main.py:1505:26 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `int | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/main.py:1505:26 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `str | None`, found `int | dict[str, (x) -> Unknown]`
- subprojects/cobyqa/cobyqa/problem.py:75:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["-", "+", " "] | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/problem.py:75:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["-", "+", " "] | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/problem.py:75:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `SupportsIndex | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/problem.py:75:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `SupportsIndex | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/problem.py:75:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `_FormatDict | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/problem.py:75:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `_FormatDict | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/problem.py:75:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `int | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/problem.py:75:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `int | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/problem.py:75:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `int | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/problem.py:75:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `str | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/problem.py:75:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `str | None`, found `int | dict[str, (x) -> Unknown]`
- subprojects/cobyqa/cobyqa/problem.py:75:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `str | None`, found `int | dict[str, (x) -> Unknown]`
- subprojects/cobyqa/cobyqa/problem.py:469:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `((ndarray[tuple[Any, ...], dtype[Any]], /) -> str) | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/problem.py:469:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `((ndarray[tuple[Any, ...], dtype[Any]], /) -> str) | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/problem.py:469:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["-", "+", " "] | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/problem.py:469:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["-", "+", " "] | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/problem.py:469:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["1.13", "1.21", "1.25", "2.1", False] | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/problem.py:469:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["1.13", "1.21", "1.25", "2.1", False] | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/problem.py:469:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["fixed", "unique", "maxprec", "maxprec_equal"] | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/problem.py:469:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["fixed", "unique", "maxprec", "maxprec_equal"] | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/problem.py:469:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `_FormatDict | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/problem.py:469:38 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `_FormatDict | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/tests/test_problem.py:63:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `SupportsIndex | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/tests/test_problem.py:63:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `SupportsIndex | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/tests/test_problem.py:63:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `_FormatDict | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/tests/test_problem.py:63:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `_FormatDict | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/tests/test_problem.py:63:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `int | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/tests/test_problem.py:63:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `str | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/tests/test_problem.py:63:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `str | None`, found `int | dict[str, (x) -> Unknown]`
- subprojects/cobyqa/cobyqa/tests/test_problem.py:226:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `((ndarray[tuple[Any, ...], dtype[Any]], /) -> str) | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/tests/test_problem.py:226:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `((ndarray[tuple[Any, ...], dtype[Any]], /) -> str) | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/tests/test_problem.py:226:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["1.13", "1.21", "1.25", "2.1", False] | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/tests/test_problem.py:226:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["1.13", "1.21", "1.25", "2.1", False] | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/tests/test_problem.py:226:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["fixed", "unique", "maxprec", "maxprec_equal"] | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/tests/test_problem.py:226:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `Literal["fixed", "unique", "maxprec", "maxprec_equal"] | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/tests/test_problem.py:226:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `bool | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/tests/test_problem.py:226:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `bool | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/tests/test_problem.py:226:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `int | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/tests/test_problem.py:226:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `int | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/tests/test_problem.py:226:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `int | None`, found `int | dict[str, (x) -> Unknown]`
+ subprojects/cobyqa/cobyqa/tests/test_problem.py:226:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `str | None`, found `int | dict[str, (x) -> str]`
- subprojects/cobyqa/cobyqa/tests/test_problem.py:226:30 error[invalid-argument-type] Argument to function `printoptions` is incorrect: Expected `str | None`, found `int | dict[str, (x) -> Unknown]`

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

spack (https://github.com/spack/spack)
- 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/cmd/find.py:231:13 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["start_date", "end_date"]` and value of type `datetime` on object of type `dict[str, InstallRecordStatus | None | ((x) -> Unknown) | bool]`
+ lib/spack/spack/cmd/find.py:231:13 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["start_date", "end_date"]` and value of type `datetime` on object of type `dict[str, InstallRecordStatus | None | ((x) -> bool) | bool]`
- lib/spack/spack/spec.py:4050:60 error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `defaultdict[Unknown, Unknown] | None`
+ lib/spack/spack/spec.py:4050: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:1084: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:1090: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:1094: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:1103: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/util/s3.py:61:16 error[invalid-argument-type] Method `__getitem__` of type `bound method dict[tuple[str, str], Any].__getitem__(key: tuple[str, str], /) -> Any` cannot be called with key of type `tuple[None | str | Unknown, Unknown | Literal["fetch"]]` on object of type `dict[tuple[str, str], Any]`
+ lib/spack/spack/util/s3.py:61:16 error[invalid-argument-type] Method `__getitem__` of type `bound method dict[tuple[str, str], Any].__getitem__(key: tuple[str, str], /) -> Any` cannot be called with key of type `tuple[None | str | UnspecializedTypeVar, Unknown | Literal["fetch"]]` on object of type `dict[tuple[str, str], Any]`
- lib/spack/spack/util/s3.py:75:5 error[invalid-assignment] Invalid subscript assignment with key of type `tuple[None | str | Unknown, Unknown | Literal["fetch"]]` and value of type `Unknown` on object of type `dict[tuple[str, str], Any]`
+ lib/spack/spack/util/s3.py:75:5 error[invalid-assignment] Invalid subscript assignment with key of type `tuple[None | str | UnspecializedTypeVar, Unknown | Literal["fetch"]]` and value of type `Unknown` on object of type `dict[tuple[str, str], Any]`
- 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 `bytes | UnspecializedTypeVar | str | PathLike[str] | PathLike[bytes]` and value of type `bytes | UnspecializedTypeVar | 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[bytes | UnspecializedTypeVar | str | PathLike[str] | PathLike[bytes]]`

sympy (https://github.com/sympy/sympy)
- sympy/core/singleton.py:236:9 error[invalid-assignment] Object of type `(obj) -> Unknown` is not assignable to attribute `__getstate__` of type `def __getstate__(self) -> object`
+ sympy/core/singleton.py:236:9 error[invalid-assignment] Object of type `(obj) -> None` is not assignable to attribute `__getstate__` of type `def __getstate__(self) -> object`
+ sympy/physics/mechanics/kane.py:448:21 error[no-matching-overload] No overload of bound method `fromkeys` matches arguments
+ sympy/physics/mechanics/tests/test_kane5.py:75:17 error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
- sympy/sets/tests/test_sets.py:59:9 error[invalid-assignment] Object of type `(x) -> Unknown` is not assignable to `def f(x) -> Unknown`
+ sympy/sets/tests/test_sets.py:59:9 error[invalid-assignment] Object of type `(x) -> cos` is not assignable to `def f(x) -> Unknown`
- sympy/strategies/traverse.py:35:30 error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Iterable[Unknown]`, found `Unknown | type`
+ sympy/strategies/traverse.py:35:30 error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Iterable[Unknown]`, found `Unknown | type | bool`

trio (https://github.com/python-trio/trio)
- 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:32 error[invalid-argument-type] Argument to function `coroutine_or_error` is incorrect: Expected `(...) -> Awaitable[Unknown]`, found `() -> Deferred`

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`
- test/test_poolmanager.py:316:9 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["http"]` and value of type `(x) -> Unknown` on object of type `dict[str, partial[PoolKey]]`
+ test/test_poolmanager.py:316:9 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["http"]` and value of type `(x) -> tuple[Unknown, ...]` on object of type `dict[str, partial[PoolKey]]`

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[Unknown | None, ...], tuple[Unknown | None, ...]]`
- torchvision/transforms/v2/_auto_augment.py:423:75 error[invalid-argument-type] Argument to bound method `_get_random_item` is incorrect: Expected `dict[str, tuple[(...) -> Unknown, bool]]`, found `Unknown | dict[str, tuple[(num_bins, height, width) -> Unknown, bool]]`
+ torchvision/transforms/v2/_auto_augment.py:423:75 error[invalid-argument-type] Argument to bound method `_get_random_item` is incorrect: Expected `dict[str, tuple[(...) -> Unknown, bool]]`, found `Unknown | dict[str, tuple[(num_bins, height, width) -> None, bool] | tuple[(num_bins, height, width) -> Unknown, bool]]`
- torchvision/transforms/v2/_auto_augment.py:491:71 error[invalid-argument-type] Argument to bound method `_get_random_item` is incorrect: Expected `dict[str, tuple[(...) -> Unknown, bool]]`, found `Unknown | dict[str, tuple[(num_bins, height, width) -> Unknown, bool]]`
+ torchvision/transforms/v2/_auto_augment.py:491:71 error[invalid-argument-type] Argument to bound method `_get_random_item` is incorrect: Expected `dict[str, tuple[(...) -> Unknown, bool]]`, found `Unknown | dict[str, tuple[(num_bins, height, width) -> None, bool] | tuple[(num_bins, height, width) -> Unknown, bool]]`

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]`
- zerver/views/streams.py:586:26 error[invalid-argument-type] Argument to function `compose_views` is incorrect: Expected `list[() -> HttpResponse]`, found `list[() -> Unknown]`
+ zerver/views/streams.py:586:26 error[invalid-argument-type] Argument to function `compose_views` is incorrect: Expected `list[() -> HttpResponse]`, found `list[() -> HttpResponse]`

Full report with detailed diff (timing results)

reveal_type(self.c)

# revealed: (*, kw_only=...) -> Unknown
# revealed: (*, kw_only=...) -> Unknown | ((*, kw_only=...) -> Unknown) | ((*, kw_only=...) -> Divergent) | ((*, kw_only=...) -> Divergent)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The revealed type here is a little unfortunate. Ideally it would just be () -> Unknown | (() -> Divergent), but I'm not sure that is an issue related to this PR.

@AlexWaygood
Copy link
Copy Markdown
Member

This PR is stacked on #22564.

The weird typing- conformance comment should be fixed if you rebase that PR on main, and then this PR on that PR (sorry for the teething problems there with the new workflow...)

@MichaReiser
Copy link
Copy Markdown
Member

There seems to be a new fuzzer panic

@ibraheemdev ibraheemdev force-pushed the ibraheem/comprehension-tcx branch from fa2b058 to 109d2a5 Compare January 19, 2026 23:26
@ibraheemdev ibraheemdev force-pushed the ibraheem/lambda-tcx branch 2 times, most recently from af62f6c to 7d33c41 Compare January 19, 2026 23:27
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Jan 19, 2026

Merging this PR will not alter performance

✅ 28 untouched benchmarks
⏩ 30 skipped benchmarks1


Comparing ibraheem/lambda-tcx (a56892e) with main (9622285)

Open in CodSpeed

Footnotes

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

@ibraheemdev ibraheemdev marked this pull request as draft January 19, 2026 23:56
Base automatically changed from ibraheem/comprehension-tcx to main January 20, 2026 20:25
@ibraheemdev ibraheemdev marked this pull request as ready for review January 20, 2026 21:04
@ibraheemdev
Copy link
Copy Markdown
Member Author

ibraheemdev commented Jan 20, 2026

There is one new fuzzer panic:

lambda: name_4

@lambda: name_5
class name_1:
    pass

name_2 = [lambda: name_4, name_1]

if name_2:
    @(*name_2,)
    class name_3:
        pass
    assert unique_name_19

@lambda: name_3
class name_4[*name_2](0, name_1=name_3):
    pass
try:
    [name_5, name_4] = *name_4, = name_4
except* 0:
    pass
else:
    async def name_4():
        pass

for name_3 in name_4:
    pass
Salsa trace
error[panic]: Panicked at ~/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/9860ff6/src/function/execute.rs:635:9 when checking `~/sandbox/main.py`: `infer_definition_types(Id(1406)): execute: too many cycle iterations`
info: This indicates a bug in ty.
info: If you could open an issue at https://github.com/astral-sh/ty/issues/new?title=%5Bpanic%5D, we'd be very appreciative!
info: Platform: linux x86_64
info: Version: ruff/0.14.13+103 (a8bb4fcbf 2026-01-20)
info: Args: ["~/ruff/target/debug/ty", "check", "main.py"]
info: run with `RUST_BACKTRACE=1` environment variable to show the full backtrace information
info: query stacktrace:
   0: infer_expression_types_impl(Id(1803))
             at crates/ty_python_semantic/src/types/infer.rs:240
             cycle heads: static_expression_truthiness(Id(1801)) -> iteration = 200, infer_definition_types(Id(1404)) -> iteration = 200
   1: infer_definition_types(Id(1409))
             at crates/ty_python_semantic/src/types/infer.rs:69
   2: place_by_id(Id(2007))
             at crates/ty_python_semantic/src/place.rs:898
             cycle heads: static_expression_truthiness(Id(1800)) -> iteration = 200, infer_definition_types(Id(1402)) -> iteration = 200, static_expression_truthiness(Id(1801)) -> iteration = 200
   3: infer_scope_types_impl(Id(1006))
             at crates/ty_python_semantic/src/types/infer.rs:192
   4: infer_definition_types(Id(1404))
             at crates/ty_python_semantic/src/types/infer.rs:69
   5: infer_expression_types_impl(Id(1802))
             at crates/ty_python_semantic/src/types/infer.rs:240
             cycle heads: static_expression_truthiness(Id(1801)) -> iteration = 200
   6: infer_unpack_types(Id(1c00))
             at crates/ty_python_semantic/src/types/infer.rs:498
   7: infer_definition_types(Id(1405))
             at crates/ty_python_semantic/src/types/infer.rs:69
             cycle heads: static_expression_truthiness(Id(1801)) -> iteration = 200
   8: place_by_id(Id(2006))
             at crates/ty_python_semantic/src/place.rs:898
             cycle heads: static_expression_truthiness(Id(1801)) -> iteration = 200
   9: infer_scope_types_impl(Id(1002))
             at crates/ty_python_semantic/src/types/infer.rs:192
  10: infer_definition_types(Id(1400))
             at crates/ty_python_semantic/src/types/infer.rs:69
  11: StaticClassLiteral < 'db >::decorators_(Id(501e))
             at crates/ty_python_semantic/src/types/class.rs:2136
  12: Type < 'db >::class_member_with_policy_(Id(9c2b))
             at crates/ty_python_semantic/src/types.rs:879
  13: Type < 'db >::member_lookup_with_policy_(Id(3c3f))
             at crates/ty_python_semantic/src/types.rs:879
  14: is_redundant_with_impl(Id(8c6e))
             at crates/ty_python_semantic/src/types/relation.rs:297
  15: infer_definition_types(Id(1402))
             at crates/ty_python_semantic/src/types/infer.rs:69
             cycle heads: static_expression_truthiness(Id(1800)) -> iteration = 200, infer_definition_types(Id(1401)) -> iteration = 200, is_redundant_with_impl(Id(8c37)) -> iteration = 200
  16: infer_scope_types_impl(Id(1007))
             at crates/ty_python_semantic/src/types/infer.rs:192
             cycle heads: static_expression_truthiness(Id(1801)) -> iteration = 200, static_expression_truthiness(Id(1800)) -> iteration = 200
  17: StaticClassLiteral < 'db >::explicit_bases_(Id(501d))
             at crates/ty_python_semantic/src/types/class.rs:2136
  18: StaticClassLiteral < 'db >::try_metaclass_(Id(501d))
             at crates/ty_python_semantic/src/types/class.rs:2136
  19: is_redundant_with_impl(Id(8c37))
             at crates/ty_python_semantic/src/types/relation.rs:297
  20: infer_scope_types_impl(Id(1004))
             at crates/ty_python_semantic/src/types/infer.rs:192
             cycle heads: place_by_id(Id(2000)) -> iteration = 200
  21: infer_definition_types(Id(1401))
             at crates/ty_python_semantic/src/types/infer.rs:69
  22: infer_expression_types_impl(Id(1800))
             at crates/ty_python_semantic/src/types/infer.rs:240
  23: static_expression_truthiness(Id(1800))
             at crates/ty_python_semantic/src/types/infer.rs:467
  24: infer_expression_types_impl(Id(1801))
             at crates/ty_python_semantic/src/types/infer.rs:240
  25: static_expression_truthiness(Id(1801))
             at crates/ty_python_semantic/src/types/infer.rs:467
  26: place_by_id(Id(2000))
             at crates/ty_python_semantic/src/place.rs:898
  27: infer_scope_types_impl(Id(1001))
             at crates/ty_python_semantic/src/types/infer.rs:192
  28: infer_scope_types_impl(Id(1000))
             at crates/ty_python_semantic/src/types/infer.rs:192
  29: check_file_impl(Id(c00))
             at crates/ty_project/src/lib.rs:554

We are now inferring the lambda bodies eagerly while inferring the outer scope, and so there is a cyclic dependency between name_2 and name_4, but I can't seem to minimize it beyond the snippet. The full traces shows the following cycle, which never converges:

infer_definition_types(Id(1406)) -> infer_definition_types(Id(1407)) ->
  infer_definition_types(Id(1406)) -> infer_unpack_types(Id(1c00)) ->
  infer_definition_types(Id(1406)) -> infer_definition_types(Id(1407)) -> ...

@dcreager
Copy link
Copy Markdown
Member

There is still a fuzzer panic on this. I'm going to move it to draft until that is resolved.

@dcreager dcreager marked this pull request as draft February 13, 2026 14:17
mtshiba pushed a commit to mtshiba/ruff that referenced this pull request Mar 6, 2026
Detailed analysis of the panic caused by eagerly inferring lambda bodies
as part of their parent scope's inference. The cycle involves circular
dependencies between name_4, name_2, name_3 through lambda body
references, unpack assignments, and class decorators.

Root cause: eager lambda body inference creates new dependency edges that
form non-converging cycles when lambda bodies reference names involved in
circular definition chains.

https://claude.ai/code/session_01Unrae9uHg8UZ2um1EKH3py
mtshiba pushed a commit that referenced this pull request Mar 6, 2026
…context

When `infer_lambda_expression` eagerly infers the lambda body via
`infer_scope_types`, it can introduce cycle edges: the lambda body may
reference names whose definitions depend on this very expression (e.g.
a lambda used as a decorator on a class that is referenced transitively
by the lambda body). Without a Callable type context, the inferred
return type participates in the cycle and can oscillate between
iterations, causing a "too many cycle iterations" panic.

Fix: only use the inferred body return type when a direct Callable type
context is available (the main feature of PR #22633). Without a type
context, fall back to `Unknown` for the return type while still
inferring the body for diagnostics (reveal_type, etc.).

https://claude.ai/code/session_0148KoTarLuZRPBttHzmZYEU
carljm added a commit that referenced this pull request Mar 10, 2026
## Summary

There are some issues with our current cycle handling, particularly with
our implementation of `Type::cycle_normalized`.

To prevent values ​​from oscillating endlessly within a fixed-point
iteration, `cycle_normalized` unions the type of the previous iteration
with the current type. This ensures monotonicity of the type inference
calculation.
However, we've observed that always applying this union can sometimes
produce undesirable results. Therefore, we make some exceptions where
this union isn't applied (see #21909, #21910).
However, these prescriptions are likely not exhaustive, and #22794 also
confirmed the occurrence of "divergent pollution" when narrowing. The
core issue in #22794 is that `Divergent` can inhibit narrowing. The
result type itself does not contain `Divergent`, but `Divergent`
indirectly affects it.
This suggests that determining whether a type contains `Divergent` is
not a perfect indicator of "taintedness".

After carefully examining these cases, I found that the problematic
"low-precision types" only appear in the first few iterations:
`Divergent` itself and the type of the next iteration constructed by
referencing it. Therefore, we shouldn't union these few iterations. I
found that this simple change can remove all of the exceptional handling
for `Divergent` introduced in #21909, #21910, and #22794.

I also found that this change removes the too-many-cycle panic blocking
#22633.

## Test Plan

mdtest updated

---------

Co-authored-by: Carl Meyer <carl@astral.sh>
@ibraheemdev ibraheemdev force-pushed the ibraheem/lambda-tcx branch 2 times, most recently from b1c3340 to a75fce6 Compare March 13, 2026 19:29
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Mar 13, 2026

Memory usage report

Summary

Project Old New Diff Outcome
prefect 711.49MB 712.06MB +0.08% (584.87kB)
sphinx 264.28MB 264.36MB +0.03% (88.13kB)
trio 117.40MB 117.42MB +0.01% (17.79kB)
flake8 47.88MB 47.88MB +0.00% (1.48kB)

Significant changes

Click to expand detailed breakdown

prefect

Name Old New Diff Outcome
infer_scope_types_impl 53.70MB 53.89MB +0.36% (197.61kB)
infer_definition_types 88.31MB 88.42MB +0.12% (105.48kB)
CallableType 2.02MB 2.05MB +1.79% (36.91kB)
infer_expression_types_impl 61.49MB 61.52MB +0.05% (33.16kB)
Type<'db>::apply_specialization_ 3.54MB 3.56MB +0.54% (19.54kB)
Type<'db>::apply_specialization_::interned_arguments 2.84MB 2.86MB +0.58% (16.80kB)
is_redundant_with_impl::interned_arguments 5.40MB 5.41MB +0.25% (14.01kB)
ScopeWithContext 45.62kB 59.53kB +30.48% (13.91kB)
Type<'db>::member_lookup_with_policy_ 16.13MB 16.14MB +0.08% (13.59kB)
Type<'db>::try_call_dunder_get_ 10.71MB 10.72MB +0.11% (12.47kB)
is_redundant_with_impl 5.49MB 5.51MB +0.21% (11.98kB)
Type<'db>::class_member_with_policy_ 17.66MB 17.68MB +0.07% (11.87kB)
infer_deferred_types 14.62MB 14.63MB +0.07% (9.96kB)
StaticClassLiteral<'db>::try_mro_ 5.83MB 5.84MB +0.16% (9.35kB)
Type<'db>::member_lookup_with_policy_::interned_arguments 5.74MB 5.75MB +0.16% (9.14kB)
... 42 more

sphinx

Name Old New Diff Outcome
infer_scope_types_impl 15.48MB 15.50MB +0.11% (16.74kB)
CallableType 1.09MB 1.10MB +0.72% (8.09kB)
infer_definition_types 23.59MB 23.60MB +0.03% (6.33kB)
Type<'db>::try_call_dunder_get_ 4.95MB 4.96MB +0.12% (6.26kB)
Type<'db>::member_lookup_with_policy_ 6.51MB 6.51MB +0.08% (5.39kB)
infer_expression_types_impl 21.47MB 21.47MB +0.02% (4.82kB)
Type<'db>::class_member_with_policy_ 7.63MB 7.63MB +0.05% (4.13kB)
is_redundant_with_impl::interned_arguments 2.02MB 2.02MB +0.18% (3.70kB)
StaticClassLiteral<'db>::try_mro_ 2.06MB 2.07MB +0.17% (3.67kB)
ScopeWithContext 6.72kB 9.77kB +45.35% (3.05kB)
Type<'db>::class_member_with_policy_::interned_arguments 4.01MB 4.02MB +0.07% (2.95kB)
Type<'db>::apply_specialization_::interned_arguments 1.44MB 1.45MB +0.20% (2.89kB)
Type<'db>::apply_specialization_ 1.64MB 1.64MB +0.15% (2.57kB)
is_redundant_with_impl 1.78MB 1.78MB +0.13% (2.29kB)
Type<'db>::member_lookup_with_policy_::interned_arguments 2.65MB 2.65MB +0.08% (2.13kB)
... 22 more

trio

Name Old New Diff Outcome
infer_scope_types_impl 4.77MB 4.78MB +0.14% (6.86kB)
infer_expression_types_impl 7.07MB 7.07MB +0.07% (5.23kB)
CallableType 577.99kB 580.03kB +0.35% (2.04kB)
infer_definition_types 7.49MB 7.49MB +0.02% (1.77kB)
check_file_impl 1.82MB 1.82MB -0.06% (1.09kB)
is_redundant_with_impl 472.39kB 473.12kB +0.15% (744.00B)
is_redundant_with_impl::interned_arguments 536.59kB 537.28kB +0.13% (704.00B)
UnionType<'db>::from_two_elements_ 280.72kB 281.39kB +0.24% (692.00B)
ScopeWithContext 1.09kB 1.56kB +42.86% (480.00B)
IntersectionType 222.34kB 222.50kB +0.07% (168.00B)
UnionType 304.47kB 304.62kB +0.05% (160.00B)
UnionType<'db>::from_two_elements_::interned_arguments 166.38kB 166.46kB +0.05% (88.00B)
infer_deferred_types 2.38MB 2.38MB +0.00% (12.00B)
function_known_decorators 921.80kB 921.81kB +0.00% (12.00B)

flake8

Name Old New Diff Outcome
infer_scope_types_impl 996.94kB 998.78kB +0.18% (1.84kB)
infer_definition_types 1.82MB 1.82MB +0.02% (456.00B)
Type<'db>::apply_specialization_ 216.86kB 216.65kB -0.10% (212.00B)
StaticClassLiteral<'db>::try_mro_ 322.89kB 322.69kB -0.06% (212.00B)
ScopeWithContext 1.09kB 1.25kB +14.29% (160.00B)
CallableType 168.26kB 168.40kB +0.08% (144.00B)
UnionType<'db>::from_two_elements_ 83.54kB 83.43kB -0.14% (116.00B)
Specialization 160.72kB 160.61kB -0.07% (112.00B)
UnionType 101.39kB 101.28kB -0.11% (112.00B)
UnionType<'db>::from_two_elements_::interned_arguments 51.91kB 51.82kB -0.17% (88.00B)
Type<'db>::apply_specialization_::interned_arguments 203.20kB 203.12kB -0.04% (80.00B)
StaticClassLiteral<'db>::try_mro_::interned_arguments 73.12kB 73.05kB -0.10% (72.00B)
check_file_impl 336.29kB 336.22kB -0.02% (72.00B)
GenericAlias 71.16kB 71.09kB -0.10% (72.00B)
infer_expression_types_impl 1.07MB 1.07MB +0.00% (12.00B)

@ibraheemdev
Copy link
Copy Markdown
Member Author

The panic has been resolved by #23563, this should be ready to review.

@ibraheemdev ibraheemdev marked this pull request as ready for review March 13, 2026 19:36
@astral-sh-bot astral-sh-bot bot requested a review from oconnor663 March 13, 2026 19:36
@carljm carljm removed their request for review March 14, 2026 01:38
Copy link
Copy Markdown
Contributor

@oconnor663 oconnor663 left a comment

Choose a reason for hiding this comment

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

Apart from the *args comment, we got on a call and IIRC decided that we need a TODO for this case:

x = lambda: [1]  # inferred: () -> list[int]
y: list[int | str] = x()  # error[invalid-assignment]

@oconnor663 oconnor663 removed their assignment Mar 17, 2026
@ibraheemdev
Copy link
Copy Markdown
Member Author

ibraheemdev commented Mar 23, 2026

There are some new ecosystem false positives here that should be fixed by #23888.

@ibraheemdev
Copy link
Copy Markdown
Member Author

It also looks like there is a very large sympy regression...

@ibraheemdev ibraheemdev force-pushed the ibraheem/lambda-tcx branch from a157cbe to aad2911 Compare March 25, 2026 21:55
@ibraheemdev ibraheemdev force-pushed the ibraheem/lambda-tcx branch from aad2911 to a56892e Compare March 26, 2026 18:03
@ibraheemdev
Copy link
Copy Markdown
Member Author

Performance regression is gone after rebasing on top of #24185 (cc @sharkdp in case this makes you feel a little better 😄).

@ibraheemdev ibraheemdev merged commit d444d52 into main Mar 26, 2026
49 checks passed
@ibraheemdev ibraheemdev deleted the ibraheem/lambda-tcx branch March 26, 2026 18:14
@sharkdp
Copy link
Copy Markdown
Contributor

sharkdp commented Mar 26, 2026

Performance regression is gone after rebasing on top of #24185 (cc @sharkdp in case this makes you feel a little better 😄).

Sorry! Glad it's resolved.

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.

6 participants