[ty] Don't quantify away non-inferable typevars before solving, take 2 - #27337
[ty] Don't quantify away non-inferable typevars before solving, take 2#27337dcreager wants to merge 5 commits into
Conversation
Typing conformance resultsNo changes detected ✅Current numbersThe percentage of diagnostics emitted that were expected errors held steady at 96.84%. The percentage of expected errors that received a diagnostic held steady at 92.11%. The number of fully passing files held steady at 99/133. |
Memory usage reportSummary
Significant changesClick to expand detailed breakdownsphinx
trio
prefect
|
|
| Lint rule | Added | Removed | Changed |
|---|---|---|---|
unresolved-attribute |
0 | 0 | 23 |
invalid-argument-type |
5 | 3 | 14 |
invalid-return-type |
3 | 3 | 9 |
unsupported-operator |
0 | 0 | 8 |
invalid-assignment |
2 | 0 | 3 |
no-matching-overload |
1 | 0 | 0 |
unused-type-ignore-comment |
0 | 1 | 0 |
| Total | 11 | 7 | 57 |
Flaky changes detected. This PR summary excludes flaky changes; see the HTML report for details.
Raw diff (75 changes)
aiohttp (https://github.com/aio-libs/aiohttp)
- aiohttp/client.py:1481:16 error[invalid-return-type] Return type does not match returned value: expected `_RetType_co@_BaseRequestContextManager`, found `ClientResponse | _RetType_co@_BaseRequestContextManager`
+ aiohttp/client.py:1481:16 error[invalid-return-type] Return type does not match returned value: expected `_RetType_co@_BaseRequestContextManager`, found `ClientResponse | Unknown`
discord.py (https://github.com/Rapptz/discord.py)
- discord/app_commands/checks.py:390:42 error[invalid-assignment] Object of type `Coroutine[Any, Any, Cooldown | None] | None | Cooldown` is not assignable to `Cooldown | None`
+ discord/app_commands/checks.py:390:42 error[invalid-assignment] Object of type `Coroutine[Any, Any, Cooldown | None] | Cooldown | None` is not assignable to `Cooldown | None`
+ discord/client.py:369:16 error[invalid-return-type] Return type does not match returned value: expected `ConnectionState[Self@_get_state]`, found `ConnectionState[Client]`
+ discord/interactions.py:405:16 error[invalid-return-type] Return type does not match returned value: expected `InteractionResponse[ClientT@Interaction]`, found `InteractionResponse[Client]`
dulwich (https://github.com/dulwich/dulwich)
- dulwich/config.py:309:16 error[invalid-return-type] Return type does not match returned value: expected `KeysView[K@CaseInsensitiveOrderedMultiDict]`, found `_UniqueKeysView[K@_UniqueKeysView]`
- dulwich/config.py:309:32 error[invalid-argument-type] Argument to `_UniqueKeysView.__init__` is incorrect: Expected `list[K@CaseInsensitiveOrderedMultiDict]`, found `list[(K@CaseInsensitiveOrderedMultiDict & str) | (K@CaseInsensitiveOrderedMultiDict & bytes) | (K@CaseInsensitiveOrderedMultiDict & tuple[str | bytes, ...])]`
hydpy (https://github.com/hydpy-dev/hydpy)
- hydpy/auxs/interptools.py:166:36 error[invalid-argument-type] Argument to constructor `enumerate.__new__` is incorrect: Expected `Iterable[Unknown]`, found `int | (Sequence[int | float] & ~float) | (ndarray[tuple[int], dtype[float64]] & ~float) | (Any & ~float) | (ndarray[tuple[Any, ...], dtype[float64]] & ~float)`
+ hydpy/auxs/interptools.py:166:36 error[invalid-argument-type] Argument to constructor `enumerate.__new__` is incorrect: Expected `Iterable[Unknown]`, found `int | (Sequence[int | float] & ~float) | (ndarray[tuple[int], dtype[float64]] & ~float) | (ndarray[tuple[Any, ...], dtype[float64]] & ~float) | (Any & ~float)`
jax (https://github.com/google/jax)
- jax/_src/checkify.py:1305:14 error[invalid-argument-type] Argument to function `safe_map` is incorrect: Expected `(_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 6 union elements, /) -> tuple[Any, ...] | tuple[int, int, int] | tuple[int] | tuple[int, int]`, found `Overload[(a: _SupportsShape[Never]) -> tuple[Any, ...], [_ShapeT](a: _SupportsShape[_ShapeT]) -> _ShapeT, (a: int | float | complex | bytes | str) -> tuple[()], [_PyScalarT](a: list[_PyScalarT] | tuple[_PyScalarT, ...]) -> tuple[int], [_PyScalarT](a: Sequence[list[_PyScalarT] | tuple[_PyScalarT, ...]]) -> tuple[int, int], [_PyScalarT](a: Sequence[Sequence[list[_PyScalarT] | tuple[_PyScalarT, ...]]]) -> tuple[int, int, int], (a: memoryview[int] | bytearray) -> tuple[int], (a: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements) -> tuple[Any, ...]]`
+ jax/_src/checkify.py:1305:14 error[invalid-argument-type] Argument to function `safe_map` is incorrect: Expected `(_SupportsShape[tuple[Any, ...] | tuple[int] | tuple[int, int] | tuple[int, int, int]] | _Buffer | _SupportsArray[dtype[Any]] | ... omitted 6 union elements, /) -> tuple[Any, ...] | tuple[int] | tuple[int, int] | tuple[int, int, int]`, found `Overload[(a: _SupportsShape[Never]) -> tuple[Any, ...], [_ShapeT](a: _SupportsShape[_ShapeT]) -> _ShapeT, (a: int | float | complex | bytes | str) -> tuple[()], [_PyScalarT](a: list[_PyScalarT] | tuple[_PyScalarT, ...]) -> tuple[int], [_PyScalarT](a: Sequence[list[_PyScalarT] | tuple[_PyScalarT, ...]]) -> tuple[int, int], [_PyScalarT](a: Sequence[Sequence[list[_PyScalarT] | tuple[_PyScalarT, ...]]]) -> tuple[int, int, int], (a: memoryview[int] | bytearray) -> tuple[int], (a: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements) -> tuple[Any, ...]]`
- jax/_src/lax/control_flow/solves.py:202:24 error[invalid-argument-type] Argument to function `safe_map` is incorrect: Expected `(_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 6 union elements, /) -> tuple[Any, ...] | tuple[int, int, int] | tuple[int] | tuple[int, int]`, found `Overload[(a: _SupportsShape[Never]) -> tuple[Any, ...], [_ShapeT](a: _SupportsShape[_ShapeT]) -> _ShapeT, (a: int | float | complex | bytes | str) -> tuple[()], [_PyScalarT](a: list[_PyScalarT] | tuple[_PyScalarT, ...]) -> tuple[int], [_PyScalarT](a: Sequence[list[_PyScalarT] | tuple[_PyScalarT, ...]]) -> tuple[int, int], [_PyScalarT](a: Sequence[Sequence[list[_PyScalarT] | tuple[_PyScalarT, ...]]]) -> tuple[int, int, int], (a: memoryview[int] | bytearray) -> tuple[int], (a: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements) -> tuple[Any, ...]]`
+ jax/_src/lax/control_flow/solves.py:202:24 error[invalid-argument-type] Argument to function `safe_map` is incorrect: Expected `(_SupportsShape[tuple[Any, ...] | tuple[int] | tuple[int, int] | tuple[int, int, int]] | _Buffer | _SupportsArray[dtype[Any]] | ... omitted 6 union elements, /) -> tuple[Any, ...] | tuple[int] | tuple[int, int] | tuple[int, int, int]`, found `Overload[(a: _SupportsShape[Never]) -> tuple[Any, ...], [_ShapeT](a: _SupportsShape[_ShapeT]) -> _ShapeT, (a: int | float | complex | bytes | str) -> tuple[()], [_PyScalarT](a: list[_PyScalarT] | tuple[_PyScalarT, ...]) -> tuple[int], [_PyScalarT](a: Sequence[list[_PyScalarT] | tuple[_PyScalarT, ...]]) -> tuple[int, int], [_PyScalarT](a: Sequence[Sequence[list[_PyScalarT] | tuple[_PyScalarT, ...]]]) -> tuple[int, int, int], (a: memoryview[int] | bytearray) -> tuple[int], (a: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements) -> tuple[Any, ...]]`
- jax/_src/lax/control_flow/solves.py:203:26 error[invalid-argument-type] Argument to function `safe_map` is incorrect: Expected `(_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 6 union elements, /) -> tuple[Any, ...] | tuple[int, int, int] | tuple[int] | tuple[int, int]`, found `Overload[(a: _SupportsShape[Never]) -> tuple[Any, ...], [_ShapeT](a: _SupportsShape[_ShapeT]) -> _ShapeT, (a: int | float | complex | bytes | str) -> tuple[()], [_PyScalarT](a: list[_PyScalarT] | tuple[_PyScalarT, ...]) -> tuple[int], [_PyScalarT](a: Sequence[list[_PyScalarT] | tuple[_PyScalarT, ...]]) -> tuple[int, int], [_PyScalarT](a: Sequence[Sequence[list[_PyScalarT] | tuple[_PyScalarT, ...]]]) -> tuple[int, int, int], (a: memoryview[int] | bytearray) -> tuple[int], (a: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements) -> tuple[Any, ...]]`
+ jax/_src/lax/control_flow/solves.py:203:26 error[invalid-argument-type] Argument to function `safe_map` is incorrect: Expected `(_SupportsShape[tuple[Any, ...] | tuple[int] | tuple[int, int] | tuple[int, int, int]] | _Buffer | _SupportsArray[dtype[Any]] | ... omitted 6 union elements, /) -> tuple[Any, ...] | tuple[int] | tuple[int, int] | tuple[int, int, int]`, found `Overload[(a: _SupportsShape[Never]) -> tuple[Any, ...], [_ShapeT](a: _SupportsShape[_ShapeT]) -> _ShapeT, (a: int | float | complex | bytes | str) -> tuple[()], [_PyScalarT](a: list[_PyScalarT] | tuple[_PyScalarT, ...]) -> tuple[int], [_PyScalarT](a: Sequence[list[_PyScalarT] | tuple[_PyScalarT, ...]]) -> tuple[int, int], [_PyScalarT](a: Sequence[Sequence[list[_PyScalarT] | tuple[_PyScalarT, ...]]]) -> tuple[int, int, int], (a: memoryview[int] | bytearray) -> tuple[int], (a: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements) -> tuple[Any, ...]]`
- jax/_src/lax/convolution.py:846:18 error[invalid-argument-type] Argument to constructor `map.__new__` is incorrect: Expected `(tuple[int | Any, int | Any] | Any | ndarray[tuple[Any, ...], Unknown], /) -> Unknown`, found `def prep_one_pad(pad_lo_hi: tuple[int | Any, int | Any]) -> Unknown`
+ jax/_src/lax/convolution.py:846:18 error[invalid-argument-type] Argument to constructor `map.__new__` is incorrect: Expected `(tuple[int | Any, int | Any] | ndarray[tuple[Any, ...], Unknown] | Any, /) -> Unknown`, found `def prep_one_pad(pad_lo_hi: tuple[int | Any, int | Any]) -> Unknown`
+ jax/_src/pallas/mosaic/interpret/shared_memory.py:394:35 error[invalid-assignment] Object of type `dataclasses.Field[dict[MemKey@GenericSharedMemory, Allocation] | dict[str, Allocation]]` is not assignable to `dict[MemKey@GenericSharedMemory, Allocation]`
pandas (https://github.com/pandas-dev/pandas)
- pandas/core/common.py:316:16 error[invalid-return-type] Return type does not match returned value: expected `Collection[T@maybe_iterable_to_list] | T@maybe_iterable_to_list`, found `list[_T@list]`
+ pandas/core/common.py:316:16 error[invalid-return-type] Return type does not match returned value: expected `Collection[T@maybe_iterable_to_list] | T@maybe_iterable_to_list`, found `list[object]`
- pandas/core/common.py:316:21 error[invalid-argument-type] Argument to `list.__init__` is incorrect: Expected `Iterable[T@maybe_iterable_to_list]`, found `(Iterable[T@maybe_iterable_to_list] & ~Sized) | (T@maybe_iterable_to_list & Iterable[object] & ~Sized)`
+ pandas/core/frame.py:19620:73 error[invalid-assignment] Object of type `defaultdict[HashableT2@_from_nested_dict, dict[HashableT@_from_nested_dict, T@_from_nested_dict] | dict[str, T@_from_nested_dict]]` is not assignable to `defaultdict[HashableT2@_from_nested_dict, dict[HashableT@_from_nested_dict, T@_from_nested_dict]]`
pip (https://github.com/pypa/pip)
- src/pip/_vendor/resolvelib/structs.py:206:12 error[invalid-return-type] Return type does not match returned value: expected `Iterable[CT@build_iter_view]`, found `_SequenceIterableView[RT@_SequenceIterableView]`
- src/pip/_vendor/resolvelib/structs.py:206:34 error[invalid-argument-type] Argument to `_SequenceIterableView.__init__` is incorrect: Expected `Sequence[CT@build_iter_view]`, found `(Iterable[CT@build_iter_view] & Sequence[object] & ~Top[(...) -> object]) | list[CT@build_iter_view]`
- src/pip/_vendor/resolvelib/structs.py:203:37 error[invalid-argument-type] Argument to `_FactoryIterableView.__init__` is incorrect: Expected `() -> Iterable[CT@build_iter_view]`, found `(Iterable[CT@build_iter_view] & Top[(...) -> object]) | (() -> Iterable[CT@build_iter_view])`
+ src/pip/_vendor/resolvelib/structs.py:203:37 error[invalid-argument-type] Argument to `_FactoryIterableView.__init__` is incorrect: Expected `() -> Iterable[Unknown]`, found `(Iterable[CT@build_iter_view] & Top[(...) -> object]) | (() -> Iterable[CT@build_iter_view])`
prefect (https://github.com/PrefectHQ/prefect)
- src/integrations/prefect-kubernetes/prefect_kubernetes/jobs.py:525:16 error[invalid-return-type] Return type does not match returned value: expected `dict[str, Any]`, found `CoroutineType[Any, Any, dict[str, Any]] | dict[str, Any]`
+ src/integrations/prefect-kubernetes/prefect_kubernetes/jobs.py:525:16 error[invalid-return-type] Return type does not match returned value: expected `dict[str, Any]`, found `Awaitable[CoroutineType[Any, Any, dict[str, Any]] | dict[str, Any]] | dict[str, Any]`
- src/prefect/flows.py:1749:16 error[invalid-return-type] Return type does not match returned value: expected `UUID`, found `CoroutineType[Any, Any, UUID] | UUID`
+ src/prefect/flows.py:1749:16 error[invalid-return-type] Return type does not match returned value: expected `UUID`, found `Awaitable[CoroutineType[Any, Any, UUID] | UUID] | UUID`
- src/prefect/runner/runner.py:376:16 error[invalid-return-type] Return type does not match returned value: expected `UUID`, found `CoroutineType[Any, Any, UUID] | UUID`
+ src/prefect/runner/runner.py:376:16 error[invalid-return-type] Return type does not match returned value: expected `UUID`, found `Awaitable[CoroutineType[Any, Any, UUID] | UUID] | UUID`
- src/prefect/runner/runner.py:534:16 error[invalid-return-type] Return type does not match returned value: expected `UUID`, found `CoroutineType[Any, Any, UUID] | UUID`
+ src/prefect/runner/runner.py:534:16 error[invalid-return-type] Return type does not match returned value: expected `UUID`, found `Awaitable[CoroutineType[Any, Any, UUID] | UUID] | UUID`
- src/prefect/runtime/deployment.py:121:12 error[unresolved-attribute] Attribute `deployment_id` is not defined on `CoroutineType[Any, Any, FlowRun]` in union `CoroutineType[Any, Any, FlowRun] | FlowRun`
+ src/prefect/runtime/deployment.py:121:12 error[unresolved-attribute] Attribute `deployment_id` is not defined on `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun]` in union `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun] | FlowRun`
- src/prefect/runtime/deployment.py:122:24 error[unresolved-attribute] Attribute `deployment_id` is not defined on `CoroutineType[Any, Any, FlowRun]` in union `CoroutineType[Any, Any, FlowRun] | FlowRun`
+ src/prefect/runtime/deployment.py:122:24 error[unresolved-attribute] Attribute `deployment_id` is not defined on `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun]` in union `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun] | FlowRun`
- src/prefect/runtime/deployment.py:141:12 error[unresolved-attribute] Attribute `parameters` is not defined on `CoroutineType[Any, Any, FlowRun]` in union `CoroutineType[Any, Any, FlowRun] | FlowRun`
+ src/prefect/runtime/deployment.py:141:12 error[unresolved-attribute] Attribute `parameters` is not defined on `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun]` in union `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun] | FlowRun`
- src/prefect/runtime/deployment.py:153:12 error[unresolved-attribute] Attribute `name` is not defined on `CoroutineType[Any, Any, DeploymentResponse]` in union `CoroutineType[Any, Any, DeploymentResponse] | DeploymentResponse`
+ src/prefect/runtime/deployment.py:153:12 error[unresolved-attribute] Attribute `name` is not defined on `Awaitable[CoroutineType[Any, Any, DeploymentResponse] | DeploymentResponse]` in union `Awaitable[CoroutineType[Any, Any, DeploymentResponse] | DeploymentResponse] | DeploymentResponse`
- src/prefect/runtime/deployment.py:165:12 error[unresolved-attribute] Attribute `version` is not defined on `CoroutineType[Any, Any, DeploymentResponse]` in union `CoroutineType[Any, Any, DeploymentResponse] | DeploymentResponse`
+ src/prefect/runtime/deployment.py:165:12 error[unresolved-attribute] Attribute `version` is not defined on `Awaitable[CoroutineType[Any, Any, DeploymentResponse] | DeploymentResponse]` in union `Awaitable[CoroutineType[Any, Any, DeploymentResponse] | DeploymentResponse] | DeploymentResponse`
- src/prefect/runtime/flow_run.py:158:16 error[unresolved-attribute] Attribute `tags` is not defined on `CoroutineType[Any, Any, FlowRun]` in union `CoroutineType[Any, Any, FlowRun] | FlowRun`
+ src/prefect/runtime/flow_run.py:158:16 error[unresolved-attribute] Attribute `tags` is not defined on `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun]` in union `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun] | FlowRun`
- src/prefect/runtime/flow_run.py:173:16 error[unresolved-attribute] Attribute `run_count` is not defined on `CoroutineType[Any, Any, FlowRun]` in union `CoroutineType[Any, Any, FlowRun] | FlowRun`
+ src/prefect/runtime/flow_run.py:173:16 error[unresolved-attribute] Attribute `run_count` is not defined on `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun]` in union `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun] | FlowRun`
- src/prefect/runtime/flow_run.py:188:16 error[unresolved-attribute] Attribute `name` is not defined on `CoroutineType[Any, Any, FlowRun]` in union `CoroutineType[Any, Any, FlowRun] | FlowRun`
+ src/prefect/runtime/flow_run.py:188:16 error[unresolved-attribute] Attribute `name` is not defined on `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun]` in union `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun] | FlowRun`
- src/prefect/runtime/flow_run.py:203:16 error[unresolved-attribute] Attribute `name` is not defined on `CoroutineType[Any, Any, Flow]` in union `CoroutineType[Any, Any, Flow] | Flow`
+ src/prefect/runtime/flow_run.py:203:16 error[unresolved-attribute] Attribute `name` is not defined on `Awaitable[CoroutineType[Any, Any, Flow] | Flow]` in union `Awaitable[CoroutineType[Any, Any, Flow] | Flow] | Flow`
- src/prefect/runtime/flow_run.py:218:16 error[unresolved-attribute] Object of type `CoroutineType[Any, Any, Flow] | Flow` has no attribute `version`
+ src/prefect/runtime/flow_run.py:218:16 error[unresolved-attribute] Object of type `Awaitable[CoroutineType[Any, Any, Flow] | Flow] | Flow` has no attribute `version`
- src/prefect/runtime/flow_run.py:233:16 error[unresolved-attribute] Attribute `expected_start_time` is not defined on `CoroutineType[Any, Any, FlowRun]` in union `CoroutineType[Any, Any, FlowRun] | FlowRun`
+ src/prefect/runtime/flow_run.py:233:16 error[unresolved-attribute] Attribute `expected_start_time` is not defined on `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun]` in union `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun] | FlowRun`
- src/prefect/runtime/flow_run.py:249:16 error[unresolved-attribute] Attribute `parameters` is not defined on `CoroutineType[Any, Any, FlowRun]` in union `CoroutineType[Any, Any, FlowRun] | FlowRun`
+ src/prefect/runtime/flow_run.py:249:16 error[unresolved-attribute] Attribute `parameters` is not defined on `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun]` in union `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun] | FlowRun`
- src/prefect/runtime/flow_run.py:263:30 error[unresolved-attribute] Attribute `parent_task_run_id` is not defined on `CoroutineType[Any, Any, FlowRun]` in union `CoroutineType[Any, Any, FlowRun] | FlowRun`
+ src/prefect/runtime/flow_run.py:263:30 error[unresolved-attribute] Attribute `parent_task_run_id` is not defined on `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun]` in union `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun] | FlowRun`
- src/prefect/runtime/flow_run.py:271:20 error[unresolved-attribute] Attribute `flow_run_id` is not defined on `CoroutineType[Any, Any, TaskRun]` in union `CoroutineType[Any, Any, TaskRun] | TaskRun`
+ src/prefect/runtime/flow_run.py:271:20 error[unresolved-attribute] Attribute `flow_run_id` is not defined on `Awaitable[CoroutineType[Any, Any, TaskRun] | TaskRun]` in union `Awaitable[CoroutineType[Any, Any, TaskRun] | TaskRun] | TaskRun`
- src/prefect/runtime/flow_run.py:271:52 error[unresolved-attribute] Attribute `flow_run_id` is not defined on `CoroutineType[Any, Any, TaskRun]` in union `CoroutineType[Any, Any, TaskRun] | TaskRun`
+ src/prefect/runtime/flow_run.py:271:52 error[unresolved-attribute] Attribute `flow_run_id` is not defined on `Awaitable[CoroutineType[Any, Any, TaskRun] | TaskRun]` in union `Awaitable[CoroutineType[Any, Any, TaskRun] | TaskRun] | TaskRun`
- src/prefect/runtime/flow_run.py:287:17 error[unresolved-attribute] Attribute `deployment_id` is not defined on `CoroutineType[Any, Any, FlowRun]` in union `CoroutineType[Any, Any, FlowRun] | (FlowRun & ~AlwaysFalsy)`
+ src/prefect/runtime/flow_run.py:287:17 error[unresolved-attribute] Attribute `deployment_id` is not defined on `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun] & ~AlwaysFalsy` in union `(Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun] & ~AlwaysFalsy) | (FlowRun & ~AlwaysFalsy)`
- src/prefect/runtime/flow_run.py:288:16 error[unresolved-attribute] Attribute `deployment_id` is not defined on `CoroutineType[Any, Any, FlowRun]` in union `CoroutineType[Any, Any, FlowRun] | (FlowRun & ~AlwaysFalsy)`
+ src/prefect/runtime/flow_run.py:288:16 error[unresolved-attribute] Attribute `deployment_id` is not defined on `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun] & ~AlwaysFalsy` in union `(Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun] & ~AlwaysFalsy) | (FlowRun & ~AlwaysFalsy)`
- src/prefect/runtime/flow_run.py:306:12 error[unresolved-attribute] Attribute `parent_task_run_id` is not defined on `CoroutineType[Any, Any, FlowRun]` in union `CoroutineType[Any, Any, FlowRun] | FlowRun`
+ src/prefect/runtime/flow_run.py:306:12 error[unresolved-attribute] Attribute `parent_task_run_id` is not defined on `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun]` in union `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun] | FlowRun`
- src/prefect/runtime/flow_run.py:310:44 error[unresolved-attribute] Attribute `parent_task_run_id` is not defined on `CoroutineType[Any, Any, FlowRun]` in union `CoroutineType[Any, Any, FlowRun] | FlowRun`
+ src/prefect/runtime/flow_run.py:310:44 error[unresolved-attribute] Attribute `parent_task_run_id` is not defined on `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun]` in union `Awaitable[CoroutineType[Any, Any, FlowRun] | FlowRun] | FlowRun`
- src/prefect/runtime/flow_run.py:312:42 error[unresolved-attribute] Attribute `flow_run_id` is not defined on `CoroutineType[Any, Any, TaskRun]` in union `CoroutineType[Any, Any, TaskRun] | TaskRun`
+ src/prefect/runtime/flow_run.py:312:42 error[unresolved-attribute] Attribute `flow_run_id` is not defined on `Awaitable[CoroutineType[Any, Any, TaskRun] | TaskRun]` in union `Awaitable[CoroutineType[Any, Any, TaskRun] | TaskRun] | TaskRun`
- src/prefect/tasks.py:1227:16 error[invalid-return-type] Return type does not match returned value: expected `T@__call__ | State[T@__call__] | None`, found `State[T@__call__] | T@__call__ | State[Never]`
+ src/prefect/tasks.py:1227:16 error[no-matching-overload] No overload of function `run_task` matches arguments
- src/prefect/utilities/asyncutils/__init__.py:198:16 error[invalid-return-type] Return type does not match returned value: expected `R@run_coro_as_sync | None`, found `CoroutineType[Any, Any, R@run_coro_as_sync | None] | None | R@run_coro_as_sync`
+ src/prefect/utilities/asyncutils/__init__.py:198:16 error[invalid-return-type] Return type does not match returned value: expected `R@run_coro_as_sync | None`, found `CoroutineType[Any, Any, R@run_coro_as_sync | None] | R@run_coro_as_sync | None`
- src/prefect/utilities/asyncutils/__init__.py:207:20 error[invalid-return-type] Return type does not match returned value: expected `R@run_coro_as_sync | None`, found `CoroutineType[Any, Any, R@run_coro_as_sync | None] | None | R@run_coro_as_sync`
+ src/prefect/utilities/asyncutils/__init__.py:207:20 error[invalid-return-type] Return type does not match returned value: expected `R@run_coro_as_sync | None`, found `CoroutineType[Any, Any, R@run_coro_as_sync | None] | R@run_coro_as_sync | None`
rotki (https://github.com/rotki/rotki)
- rotkehlchen/chain/decoding/tools.py:44:59 error[invalid-assignment] Object of type `frozenset[A@BaseDecoderTools | BTCAddress | ChecksumAddress | SubstrateAddress | SolanaAddress]` is not assignable to `frozenset[A@BaseDecoderTools]`: Incompatible value of type `frozenset[A@BaseDecoderTools | BTCAddress | ChecksumAddress | SubstrateAddress | SolanaAddress]`
+ rotkehlchen/chain/decoding/tools.py:44:59 error[invalid-assignment] Object of type `frozenset[BTCAddress | ChecksumAddress | SubstrateAddress | SolanaAddress]` is not assignable to `frozenset[A@BaseDecoderTools]`: Incompatible value of type `frozenset[BTCAddress | ChecksumAddress | SubstrateAddress | SolanaAddress]`
- rotkehlchen/chain/decoding/tools.py:101:9 error[invalid-assignment] Object of type `frozenset[A@BaseDecoderTools | BTCAddress | ChecksumAddress | SubstrateAddress | SolanaAddress]` is not assignable to attribute `_tracked_addresses_for_chain` of type `frozenset[A@BaseDecoderTools]`
+ rotkehlchen/chain/decoding/tools.py:101:9 error[invalid-assignment] Object of type `frozenset[BTCAddress | ChecksumAddress | SubstrateAddress | SolanaAddress]` is not assignable to attribute `_tracked_addresses_for_chain` of type `frozenset[A@BaseDecoderTools]`
static-frame (https://github.com/static-frame/static-frame)
- static_frame/core/bus.py:680:59 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- static_frame/core/node_selector.py:452:40 error[invalid-argument-type] Argument to `InterGetItemILocReduces.__init__` is incorrect: Expected `((int | integer[Any], /) -> Any) | ((ndarray[Any, Any] | list[int] | slice[Any, Any, Any] | None, /) -> TVContainer_co@InterfaceSelectDuo)`, found `TILocSelectorFunc@__init__`
+ static_frame/core/node_selector.py:452:40 error[invalid-argument-type] Argument to `InterGetItemILocReduces.__init__` is incorrect: Expected `((int | integer[Any], /) -> Any) | ((ndarray[Any, Any] | list[int] | slice[Any, Any, Any] | None, /) -> Unknown)`, found `TILocSelectorFunc@__init__`
- static_frame/core/node_selector.py:456:39 error[invalid-argument-type] Argument to `InterGetItemLocReduces.__init__` is incorrect: Expected `(Hashable | int | integer[Any] | ... omitted 16 union elements, /) -> TVContainer_co@InterfaceSelectDuo | Any`, found `TLocSelectorFunc@__init__`
+ static_frame/core/node_selector.py:456:39 error[invalid-argument-type] Argument to `InterGetItemLocReduces.__init__` is incorrect: Expected `(Hashable | int | integer[Any] | ... omitted 16 union elements, /) -> Unknown`, found `TLocSelectorFunc@__init__`
- static_frame/core/node_selector.py:487:33 error[invalid-argument-type] Argument to `InterGetItemILoc.__init__` is incorrect: Expected `((int | integer[Any], /) -> Any) | ((ndarray[Any, Any] | list[int] | slice[Any, Any, Any] | None, /) -> TVContainer_co@InterfaceSelectTrio)`, found `TILocSelectorFunc@__init__`
+ static_frame/core/node_selector.py:487:33 error[invalid-argument-type] Argument to `InterGetItemILoc.__init__` is incorrect: Expected `((int | integer[Any], /) -> Any) | ((ndarray[Any, Any] | list[int] | slice[Any, Any, Any] | None, /) -> Unknown)`, found `TILocSelectorFunc@__init__`
- static_frame/core/node_selector.py:492:32 error[invalid-argument-type] Argument to `InterGetItemLoc.__init__` is incorrect: Expected `(Hashable | int | integer[Any] | ... omitted 16 union elements, /) -> TVContainer_co@InterfaceSelectTrio`, found `TLocSelectorFunc@__init__`
+ static_frame/core/node_selector.py:492:32 error[invalid-argument-type] Argument to `InterGetItemLoc.__init__` is incorrect: Expected `(Hashable | int | integer[Any] | ... omitted 16 union elements, /) -> Unknown`, found `TLocSelectorFunc@__init__`
- static_frame/core/node_selector.py:531:40 error[invalid-argument-type] Argument to `InterGetItemILocReduces.__init__` is incorrect: Expected `((int | integer[Any], /) -> Any) | ((ndarray[Any, Any] | list[int] | slice[Any, Any, Any] | None, /) -> TVContainer_co@InterfaceSelectQuartet)`, found `TILocSelectorFunc@__init__`
+ static_frame/core/node_selector.py:531:40 error[invalid-argument-type] Argument to `InterGetItemILocReduces.__init__` is incorrect: Expected `((int | integer[Any], /) -> Any) | ((ndarray[Any, Any] | list[int] | slice[Any, Any, Any] | None, /) -> Unknown)`, found `TILocSelectorFunc@__init__`
- static_frame/core/node_selector.py:536:39 error[invalid-argument-type] Argument to `InterGetItemLocReduces.__init__` is incorrect: Expected `(Hashable | int | integer[Any] | ... omitted 16 union elements, /) -> TVContainer_co@InterfaceSelectQuartet | Any`, found `TLocSelectorFunc@__init__`
+ static_frame/core/node_selector.py:536:39 error[invalid-argument-type] Argument to `InterGetItemLocReduces.__init__` is incorrect: Expected `(Hashable | int | integer[Any] | ... omitted 16 union elements, /) -> Unknown`, found `TLocSelectorFunc@__init__`
- static_frame/core/series_mapping.py:60:16 error[invalid-return-type] Return type does not match returned value: expected `Iterator[TVValues@SeriesMappingValuesView]`, found `Iterator[Any | ndarray[tuple[Any, ...], Any]]`
+ static_frame/core/series_mapping.py:60:16 error[invalid-return-type] Return type does not match returned value: expected `Iterator[TVValues@SeriesMappingValuesView]`, found `Iterator[ndarray[tuple[Any, ...], Any] | Any]`
steam.py (https://github.com/Gobot1234/steam.py)
+ steam/abc.py:572:16 error[invalid-return-type] Return type does not match returned value: expected `EquippedProfileItems[Self@equipped_profile_items]`, found `EquippedProfileItems[UserT@EquippedProfileItems]`
+ steam/abc.py:573:13 error[invalid-argument-type] Argument is incorrect: Expected `ProfileItem[User] | None`, found `ProfileItem[Self@equipped_profile_items] | None`
+ steam/abc.py:574:13 error[invalid-argument-type] Argument is incorrect: Expected `ProfileItem[User] | None`, found `ProfileItem[Self@equipped_profile_items] | None`
+ steam/abc.py:577:13 error[invalid-argument-type] Argument is incorrect: Expected `ProfileItem[User] | None`, found `ProfileItem[Self@equipped_profile_items] | None`
+ steam/abc.py:578:13 error[invalid-argument-type] Argument is incorrect: Expected `ProfileItem[User] | None`, found `ProfileItem[Self@equipped_profile_items] | None`
+ steam/abc.py:579:13 error[invalid-argument-type] Argument is incorrect: Expected `ProfileItem[User] | None`, found `ProfileItem[Self@equipped_profile_items] | None`
sympy (https://github.com/sympy/sympy)
- sympy/physics/hydrogen.py:84:11 error[unsupported-operator] Operator `-` is not supported between two objects of type `Basic | int | Unknown`
+ sympy/physics/hydrogen.py:84:11 error[unsupported-operator] Operator `-` is not supported between two objects of type `Basic | Unknown | int`
- sympy/physics/hydrogen.py:86:9 error[unsupported-operator] Operator `/` is not supported between objects of type `Literal[1]` and `Basic | int | Unknown`
+ sympy/physics/hydrogen.py:86:9 error[unsupported-operator] Operator `/` is not supported between objects of type `Literal[1]` and `Basic | Unknown | int`
- sympy/physics/hydrogen.py:87:10 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[2]` and `Basic | int | Unknown`
+ sympy/physics/hydrogen.py:87:10 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[2]` and `Basic | Unknown | int`
- sympy/physics/hydrogen.py:89:50 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[2]` and `Basic | int | Unknown`
+ sympy/physics/hydrogen.py:89:50 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[2]` and `Basic | Unknown | int`
- sympy/physics/hydrogen.py:89:64 error[unsupported-operator] Operator `+` is not supported between two objects of type `Basic | int | Unknown`
+ sympy/physics/hydrogen.py:89:64 error[unsupported-operator] Operator `+` is not supported between two objects of type `Basic | Unknown | int`
- sympy/physics/hydrogen.py:93:44 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[2]` and `Basic | int | Unknown`
+ sympy/physics/hydrogen.py:93:44 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[2]` and `Basic | Unknown | int`
- sympy/physics/hydrogen.py:288:8 error[unresolved-attribute] Attribute `is_integer` is not defined on `int` in union `Basic | int | Unknown`
+ sympy/physics/hydrogen.py:288:8 error[unresolved-attribute] Attribute `is_integer` is not defined on `int` in union `Basic | Unknown | int`
- sympy/physics/hydrogen.py:288:25 error[unsupported-operator] Operator `<` is not supported between objects of type `Basic | int | Unknown` and `Literal[1]`
+ sympy/physics/hydrogen.py:288:25 error[unsupported-operator] Operator `<` is not supported between objects of type `Basic | Unknown | int` and `Literal[1]`
- sympy/physics/hydrogen.py:290:8 error[unresolved-attribute] Attribute `is_integer` is not defined on `int` in union `Basic | int | Unknown`
+ sympy/physics/hydrogen.py:290:8 error[unresolved-attribute] Attribute `is_integer` is not defined on `int` in union `Basic | Unknown | int`
- sympy/physics/hydrogen.py:290:30 error[unsupported-operator] Operator `>` is not supported between two objects of type `Basic | int | Unknown`
+ sympy/physics/hydrogen.py:290:30 error[unsupported-operator] Operator `>` is not supported between two objects of type `Basic | Unknown | int`
- sympy/physics/hydrogen.py:292:34 error[invalid-argument-type] Argument to function `abs` is incorrect: Expected `SupportsAbs[Unknown]`, found `Basic | int | Unknown`
+ sympy/physics/hydrogen.py:292:34 error[invalid-argument-type] Argument to function `abs` is incorrect: Expected `SupportsAbs[Unknown]`, found `Basic | Unknown | int`
- sympy/physics/hydrogen.py:292:8 error[unresolved-attribute] Attribute `is_integer` is not defined on `int` in union `Basic | int | Unknown`
+ sympy/physics/hydrogen.py:292:8 error[unresolved-attribute] Attribute `is_integer` is not defined on `int` in union `Basic | Unknown | int`
tornado (https://github.com/tornadoweb/tornado)
- tornado/gen.py:239:62 error[invalid-argument-type] Argument to `Runner.__init__` is incorrect: Expected `None | Awaitable[Unknown] | list[Awaitable[Unknown]] | dict[Any, Awaitable[Unknown]] | Future[Unknown]`, found `_T@next | _VT@next | _T@next`
+ tornado/gen.py:239:62 error[invalid-argument-type] Argument to `Runner.__init__` is incorrect: Expected `None | Awaitable[Unknown] | list[Awaitable[Unknown]] | dict[Any, Awaitable[Unknown]] | Future[Unknown]`, found `_T@next | _T@next | _VT@next`| self.sorted_paths.dedup_by(|path1, path2| { | ||
| let source_orders1 = path1.iter(); | ||
| let source_orders2 = path2.iter(); | ||
| source_orders1.eq(source_orders2) | ||
| }); |
There was a problem hiding this comment.
note to self: this is stale, remove this
22730cc to
eeaf7c3
Compare
Merging this PR will improve performance by 6.06%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | attrs (frozen inputs) |
581.6 ms | 547.6 ms | +6.22% |
| ⚡ | Simulation | attrs |
617.4 ms | 583 ms | +5.9% |
| 🆕 | Memory | ty_micro[independent_noninferable_alternatives/first/12] |
N/A | 12.4 MB | N/A |
| 🆕 | Memory | ty_micro[independent_noninferable_alternatives/first/16] |
N/A | 12.5 MB | N/A |
| 🆕 | Memory | ty_micro[independent_noninferable_alternatives/first/20] |
N/A | 12.6 MB | N/A |
| 🆕 | Memory | ty_micro[independent_noninferable_alternatives/first/4] |
N/A | 8.4 MB | N/A |
| 🆕 | Memory | ty_micro[independent_noninferable_alternatives/first/8] |
N/A | 12.6 MB | N/A |
| 🆕 | Memory | ty_micro[independent_noninferable_alternatives/last/12] |
N/A | 12.4 MB | N/A |
| 🆕 | Memory | ty_micro[independent_noninferable_alternatives/last/16] |
N/A | 12.5 MB | N/A |
| 🆕 | Memory | ty_micro[independent_noninferable_alternatives/last/20] |
N/A | 12.6 MB | N/A |
| 🆕 | Memory | ty_micro[independent_noninferable_alternatives/last/4] |
N/A | 8.4 MB | N/A |
| 🆕 | Memory | ty_micro[independent_noninferable_alternatives/last/8] |
N/A | 12.6 MB | N/A |
Tip
Curious why this is faster? Use the CodSpeed MCP and ask your agent.
Comparing dcreager/remove-remove-noninferable-2 (eeaf7c3) with main (4a437b0)
Footnotes
-
41 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. ↩
This is a cleanup PR that is part of the scoped quantifier work.
When solving a constraint set, we only care about solutions for the typevars that are inferable. Before, we would handle this by using quantification to remove the non-inferable typevars from the constraint set, relying on our sequent map implementation to propagate constraints on non-inferable typevars over to inferable typevars where appropriate.
We now skip this step, and generate solution paths for the original constraint set directly. This PR implements a custom BDD path-walker, which means that we still use the sequent map to detect correlations between typevars (including between inferable and non-inferable). The custom walker detects when we encounter a BDD node multiple times in "equivalent" contexts, taking into account only the typevars that could affect the solution that we read off for the current path. It also detects when we encounter a BDD node that cannot further affect the solution for the current path. This is important both to eliminate duplicate results, but also to more aggressively prune parts of the search tree. Both are needed to make sure that we achieve these results regardless of BDD variable ordering. (If an "irrelevant" constraint appears first, then we will encounter the "relevant" nodes later multiple times in different contexts; if the irrelevant constraint appears later, then when we it it won't contribute to the current path.)