[ty] Use existential quantification to only consider inferable typevars#24383
Merged
[ty] Use existential quantification to only consider inferable typevars#24383
Conversation
Typing conformance resultsNo changes detected ✅Current numbersThe percentage of diagnostics emitted that were expected errors held steady at 87.94%. The percentage of expected errors that received a diagnostic held steady at 83.36%. The number of fully passing files held steady at 79/133. |
Memory usage reportSummary
Significant changesClick to expand detailed breakdownflake8
sphinx
trio
prefect
|
|
| Lint rule | Added | Removed | Changed |
|---|---|---|---|
type-assertion-failure |
24 | 25 | 24 |
invalid-argument-type |
62 | 2 | 3 |
invalid-await |
1 | 40 | 0 |
unsupported-operator |
20 | 0 | 0 |
invalid-return-type |
6 | 2 | 3 |
no-matching-overload |
9 | 1 | 0 |
unresolved-attribute |
6 | 0 | 2 |
invalid-assignment |
0 | 3 | 3 |
missing-argument |
1 | 0 | 0 |
unknown-argument |
1 | 0 | 0 |
| Total | 130 | 73 | 35 |
Raw diff (238 changes)
cloud-init (https://github.com/canonical/cloud-init)
+ cloudinit/analyze/__init__.py:226:21 error[no-matching-overload] No overload of bound method `str.join` matches arguments
core (https://github.com/home-assistant/core)
- homeassistant/components/litterrobot/select.py:164:9 error[invalid-assignment] Object of type `list[_S@map]` is not assignable to attribute `_attr_options` of type `list[str]`
- homeassistant/components/litterrobot/select.py:164:44 error[invalid-argument-type] Argument to constructor `map.__new__` is incorrect: Expected `Iterable[Buffer]`, found `list[_CastTypeT@LitterRobotSelectEntity]`
discord.py (https://github.com/Rapptz/discord.py)
- discord/app_commands/checks.py:390:42 error[invalid-assignment] Object of type `Cooldown | None | Coroutine[Any, Any, Cooldown | None]` is not assignable to `Cooldown | None`
+ discord/app_commands/checks.py:390:42 error[invalid-assignment] Object of type `Cooldown | Coroutine[Any, Any, Cooldown | None] | None` is not assignable to `Cooldown | None`
ibis (https://github.com/ibis-project/ibis)
- ibis/backends/__init__.py:1102:23 error[invalid-argument-type] Argument to function `sorted` is incorrect: Expected `Iterable[str]`, found `filter[_T@filter]`
+ ibis/backends/__init__.py:1102:16 error[invalid-return-type] Return type does not match returned value: expected `list[str]`, found `list[_T@filter]`
+ ibis/expr/schema.py:36:17 error[unsupported-operator] Operator `+` is not supported between objects of type `Literal[2]` and `_S@map | Literal[0]`
materialize (https://github.com/MaterializeInc/materialize)
- misc/python/materialize/feature_benchmark/report.py:39:13 error[invalid-assignment] Object of type `int | float` is not assignable to attribute `mean` of type `T@ReportMeasurement | None`
operator (https://github.com/canonical/operator)
- ops/lib/__init__.py:197:40 error[invalid-argument-type] Argument to function `sorted` is incorrect: Expected `Iterable[str]`, found `set[_T@set]`
+ ops/lib/__init__.py:197:33 error[invalid-argument-type] Argument to function `_join_and` is incorrect: Expected `list[str]`, found `list[_T@set]`
pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
- tests/indexes/bool/test_mul.py:39:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[bool]`
+ tests/indexes/bool/test_mul.py:39:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[bool]`
+ tests/indexes/bool/test_mul.py:39:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Index[bool]` and `Literal[True]`
- tests/indexes/bool/test_mul.py:40:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int]`
+ tests/indexes/bool/test_mul.py:40:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int]`
+ tests/indexes/bool/test_mul.py:40:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Index[bool]` and `Literal[1]`
- tests/indexes/bool/test_mul.py:47:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[bool]`
+ tests/indexes/bool/test_mul.py:47:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[bool]`
+ tests/indexes/bool/test_mul.py:47:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[True]` and `Index[bool]`
- tests/indexes/bool/test_mul.py:48:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int]`
+ tests/indexes/bool/test_mul.py:48:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int]`
+ tests/indexes/bool/test_mul.py:48:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[1]` and `Index[bool]`
- tests/indexes/bool/test_mul.py:62:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[bool]`
+ tests/indexes/bool/test_mul.py:62:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[bool]`
+ tests/indexes/bool/test_mul.py:62:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Index[bool]` and `list[bool]`
- tests/indexes/bool/test_mul.py:63:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int]`
+ tests/indexes/bool/test_mul.py:63:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int]`
+ tests/indexes/bool/test_mul.py:63:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Index[bool]` and `list[int]`
- tests/indexes/bool/test_mul.py:70:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[bool]`
+ tests/indexes/bool/test_mul.py:70:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[bool]`
+ tests/indexes/bool/test_mul.py:70:23 error[unsupported-operator] Operator `*` is not supported between objects of type `list[bool]` and `Index[bool]`
- tests/indexes/bool/test_mul.py:71:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int]`
+ tests/indexes/bool/test_mul.py:71:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int]`
+ tests/indexes/bool/test_mul.py:71:23 error[unsupported-operator] Operator `*` is not supported between objects of type `list[int]` and `Index[bool]`
- tests/indexes/int/test_mul.py:40:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int]`
- tests/indexes/int/test_mul.py:41:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int]`
- tests/indexes/int/test_mul.py:48:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int]`
- tests/indexes/int/test_mul.py:49:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int]`
- tests/indexes/int/test_mul.py:63:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int]`
- tests/indexes/int/test_mul.py:64:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int]`
- tests/indexes/int/test_mul.py:71:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int]`
- tests/indexes/int/test_mul.py:72:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int]`
+ tests/indexes/test_mul.py:28:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[Any]`
+ tests/indexes/test_mul.py:29:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[Any]`
+ tests/indexes/test_mul.py:33:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[Any]`
+ tests/indexes/test_mul.py:34:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[Any]`
+ tests/indexes/test_mul.py:43:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[Any]`
+ tests/indexes/test_mul.py:44:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[Any]`
+ tests/indexes/test_mul.py:48:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[Any]`
+ tests/indexes/test_mul.py:49:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[Any]`
- tests/series/bool/test_mul.py:40:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:40:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:40:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Series[bool]` and `Literal[True]`
- tests/series/bool/test_mul.py:41:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:41:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:41:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Series[bool]` and `Literal[1]`
- tests/series/bool/test_mul.py:48:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:48:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:48:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[True]` and `Series[bool]`
- tests/series/bool/test_mul.py:49:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:49:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:49:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[1]` and `Series[bool]`
- tests/series/bool/test_mul.py:56:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:56:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:56:23 error[no-matching-overload] No overload of bound method `Series.mul` matches arguments
- tests/series/bool/test_mul.py:57:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:57:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:57:23 error[no-matching-overload] No overload of bound method `Series.mul` matches arguments
- tests/series/bool/test_mul.py:64:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:64:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:64:23 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- tests/series/bool/test_mul.py:65:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:65:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:65:23 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- tests/series/bool/test_mul.py:81:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:81:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:81:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Series[bool]` and `list[bool]`
- tests/series/bool/test_mul.py:82:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:82:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:82:23 error[unsupported-operator] Operator `*` is not supported between objects of type `Series[bool]` and `list[int]`
- tests/series/bool/test_mul.py:89:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:89:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:89:23 error[unsupported-operator] Operator `*` is not supported between objects of type `list[bool]` and `Series[bool]`
- tests/series/bool/test_mul.py:90:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:90:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:90:23 error[unsupported-operator] Operator `*` is not supported between objects of type `list[int]` and `Series[bool]`
- tests/series/bool/test_mul.py:97:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:97:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:97:23 error[no-matching-overload] No overload of bound method `Series.mul` matches arguments
- tests/series/bool/test_mul.py:98:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:98:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:98:23 error[no-matching-overload] No overload of bound method `Series.mul` matches arguments
- tests/series/bool/test_mul.py:105:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:105:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[bool]`
+ tests/series/bool/test_mul.py:105:23 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- tests/series/bool/test_mul.py:106:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:106:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
+ tests/series/bool/test_mul.py:106:23 error[no-matching-overload] No overload of bound method `Series.rmul` matches arguments
- tests/series/int/test_mul.py:40:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_mul.py:41:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_mul.py:48:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_mul.py:49:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_mul.py:56:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_mul.py:57:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_mul.py:64:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_mul.py:65:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_mul.py:81:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_mul.py:82:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_mul.py:89:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_mul.py:90:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_mul.py:97:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_mul.py:98:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_mul.py:105:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_mul.py:106:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
+ tests/series/test_mul.py:28:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_mul.py:29:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_mul.py:33:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_mul.py:34:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_mul.py:38:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_mul.py:39:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_mul.py:43:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_mul.py:44:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_mul.py:53:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_mul.py:54:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_mul.py:58:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_mul.py:59:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_mul.py:63:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_mul.py:64:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_mul.py:68:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_mul.py:69:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
- tests/series/test_series.py:855:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
prefect (https://github.com/PrefectHQ/prefect)
- src/integrations/prefect-docker/tests/test_containers.py:26:31 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_containers.py:41:26 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_containers.py:54:31 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_containers.py:67:31 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_containers.py:80:31 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-docker/tests/test_containers.py:27:47 error[invalid-argument-type] Argument is incorrect: Expected `bool | None`, found `str | bool | dict[str, int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str | bool | dict[str, int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, str] | list[str] | None`, found `str | bool | dict[str, int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47 error[invalid-argument-type] Argument is incorrect: Expected `str | None`, found `str | bool | dict[str, int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47 error[invalid-argument-type] Argument is incorrect: Expected `str | list[str] | None`, found `str | bool | dict[str, int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47 error[invalid-argument-type] Argument is incorrect: Expected `str`, found `str | bool | dict[str, int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:42:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
+ src/integrations/prefect-docker/tests/test_containers.py:55:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
+ src/integrations/prefect-docker/tests/test_containers.py:68:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
+ src/integrations/prefect-docker/tests/test_containers.py:81:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
- src/integrations/prefect-docker/tests/test_images.py:28:27 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_images.py:48:27 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_images.py:63:28 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-docker/tests/test_images.py:29:47 error[invalid-argument-type] Argument is incorrect: Expected `DockerRegistryCredentials | None`, found `str`
+ src/integrations/prefect-docker/tests/test_images.py:29:47 error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `str`
+ src/integrations/prefect-docker/tests/test_images.py:29:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
+ src/integrations/prefect-docker/tests/test_images.py:31:16 error[unresolved-attribute] Attribute `id` is not defined on `list[Unknown]` in union `Unknown | list[Unknown]`
+ src/integrations/prefect-docker/tests/test_images.py:51:17 error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `str`
+ src/integrations/prefect-docker/tests/test_images.py:51:17 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
+ src/integrations/prefect-docker/tests/test_images.py:53:16 error[unresolved-attribute] Attribute `id` is not defined on `list[Unknown]` in union `Unknown | list[Unknown]`
+ src/integrations/prefect-docker/tests/test_images.py:64:47 error[invalid-argument-type] Argument is incorrect: Expected `DockerRegistryCredentials | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:64:47 error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:64:47 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:64:47 error[invalid-argument-type] Argument is incorrect: Expected `str | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:64:47 error[invalid-argument-type] Argument is incorrect: Expected `str`, found `str | bool`
- src/integrations/prefect-docker/tests/test_images.py:16:23 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-docker/tests/test_images.py:16:44 error[invalid-argument-type] Argument is incorrect: Expected `DockerHost | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44 error[invalid-argument-type] Argument is incorrect: Expected `DockerRegistryCredentials | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44 error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44 error[invalid-argument-type] Argument is incorrect: Expected `str | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44 error[invalid-argument-type] Argument is incorrect: Expected `str`, found `str | bool`
- src/integrations/prefect-kubernetes/prefect_kubernetes/jobs.py:425:33 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-kubernetes/prefect_kubernetes/jobs.py:428:17 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:16:15 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:24:15 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:33:15 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:46:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:98:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:144:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:190:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:236:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:274:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:332:11 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:20:13 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `None`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:29:13 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `None`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:38:13 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `None`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:57:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:103:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:149:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:195:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:240:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:286:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:344:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
- src/integrations/prefect-kubernetes/tests/test_deployments.py:16:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_deployments.py:34:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_deployments.py:68:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_deployments.py:88:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_deployments.py:110:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_deployments.py:137:11 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:18:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:38:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:70:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:92:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:113:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:141:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
- src/integrations/prefect-kubernetes/tests/test_jobs.py:34:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:50:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:66:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:84:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:104:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:127:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:156:11 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:36:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:52:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:68:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:87:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:107:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:131:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:159:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
- src/integrations/prefect-kubernetes/tests/test_pods.py:27:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:42:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:76:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:92:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:112:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:133:11 error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:163:11 error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-kubernetes/tests/test_pods.py:29:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:46:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:78:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:96:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:115:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:137:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:167:9 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
- src/prefect/cache_policies.py:311:25 error[unresolved-attribute] Object of type `((...) -> Any) & ((*args: object, **kwargs: object) -> object)` has no attribute `__code__`
+ src/prefect/cache_policies.py:311:25 error[unresolved-attribute] Object of type `(...) -> Any` has no attribute `__code__`
+ src/prefect/task_engine.py:1642:28 error[invalid-await] `R@AsyncTaskRunEngine | Coroutine[Any, Any, R@AsyncTaskRunEngine]` is not awaitable
- src/prefect/tasks.py:2250:16 error[invalid-return-type] Return type does not match returned value: expected `MaterializingTask[P@MaterializingTask, R@MaterializingTask]`, found `MaterializingTask[(*args: object, **kwargs: object), object]`
- src/prefect/tasks.py:185:9 error[unresolved-attribute] Object of type `((...) -> Any) & ((*args: object, **kwargs: object) -> object)` has no attribute `__code__`
+ src/prefect/tasks.py:185:9 error[unresolved-attribute] Object of type `(...) -> Any` has no attribute `__code__`
- src/prefect/tasks.py:663:13 error[invalid-assignment] Object of type `Any & ~AlwaysFalsy` is not assignable to attribute `__prefect_self__` on type `((**P@Task) -> R@Task) & ((*args: object, **kwargs: object) -> object)`
+ src/prefect/tasks.py:663:13 error[unresolved-attribute] Unresolved attribute `__prefect_self__` on type `(**P@Task) -> R@Task`
- src/prefect/tasks.py:799:13 error[invalid-argument-type] Argument to `Task.__init__` is incorrect: Expected `(() -> str) | TaskRunNameCallbackWithParameters | str | None`, found `((() -> str) & ~<class 'NotSet'>) | TaskRunNameCallbackWithParameters | str | ... omitted 3 union elements`
+ src/prefect/tasks.py:799:13 error[invalid-argument-type] Argument to `Task.__init__` is incorrect: Expected `(() -> str) | TaskRunNameCallbackWithParameters | str | None`, found `(() -> str) | TaskRunNameCallbackWithParameters | str | (type[NotSet] & ~<class 'NotSet'>) | None`
- src/prefect/tasks.py:1213:16 error[no-matching-overload] No overload of function `run_task` matches arguments
+ src/prefect/tasks.py:1213: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/utilities/_engine.py:85:12 error[invalid-return-type] Return type does not match returned value: expected `str`, found `object`
- src/prefect/utilities/_engine.py:64:13 error[invalid-argument-type] Argument to bound method `TaskRunNameCallbackWithParameters.is_callback_with_parameters` is incorrect: Expected `(...) -> str`, found `(str & Top[(...) -> object]) | ((() -> str) & ((*args: object, **kwargs: object) -> object)) | (TaskRunNameCallbackWithParameters & ((*args: object, **kwargs: object) -> object))`
+ src/prefect/utilities/_engine.py:64:13 error[invalid-argument-type] Argument to bound method `TaskRunNameCallbackWithParameters.is_callback_with_parameters` is incorrect: Expected `(...) -> str`, found `(str & Top[(...) -> object]) | (() -> str) | TaskRunNameCallbackWithParameters`
+ src/prefect/utilities/_engine.py:66:48 error[unknown-argument] Argument `parameters` does not match any known parameter
+ src/prefect/utilities/_engine.py:69:29 error[missing-argument] No argument provided for required parameter `parameters` of bound method `TaskRunNameCallbackWithParameters.__call__`
+ src/prefect/utilities/templating/__init__.py:337:17 error[invalid-argument-type] Argument is incorrect: Argument type `object` does not satisfy constraints (`str`, `int`, `int | float`, `bool`, `dict[Any, Any]`, `list[Any]`, `None`) of type variable `T`
+ src/prefect/utilities/templating/__init__.py:344:17 error[invalid-argument-type] Argument is incorrect: Argument type `object` does not satisfy constraints (`str`, `int`, `int | float`, `bool`, `dict[Any, Any]`, `list[Any]`, `None`) of type variable `T`
+ src/prefect/utilities/templating/__init__.py:462:42 error[invalid-argument-type] Argument is incorrect: Argument type `object` does not satisfy constraints (`str`, `int`, `int | float`, `bool`, `dict[Any, Any]`, `list[Any]`, `None`) of type variable `T`
- src/prefect/utilities/templating/__init__.py:339:13 error[invalid-assignment] Invalid subscript assignment with key of type `object` and value of type `Unknown` on object of type `dict[str, Any]`
+ src/prefect/utilities/templating/__init__.py:339:13 error[invalid-assignment] Invalid subscript assignment with key of type `object` and value of type `Unknown | dict[str, Any]` on object of type `dict[str, Any]`
- src/prefect/utilities/templating/__init__.py:342:16 error[invalid-return-type] Return type does not match returned value: expected `T@resolve_block_document_references | dict[str, Any]`, found `list[Unknown]`
+ src/prefect/utilities/templating/__init__.py:342:16 error[invalid-return-type] Return type does not match returned value: expected `T@resolve_block_document_references | dict[str, Any]`, found `list[Unknown | dict[str, Any]]`
+ src/prefect/utilities/templating/__init__.py:466:41 error[invalid-argument-type] Argument is incorrect: Argument type `object` does not satisfy constraints (`str`, `int`, `int | float`, `bool`, `dict[Any, Any]`, `list[Any]`, `None`) of type variable `T`
+ src/prefect/workers/base.py:243:13 error[invalid-argument-type] Argument is incorrect: Argument type `str | dict[str, Any]` does not satisfy constraints (`str`, `int`, `int | float`, `bool`, `dict[Any, Any]`, `list[Any]`, `None`) of type variable `T`
pytest (https://github.com/pytest-dev/pytest)
+ src/_pytest/_py/path.py:318:20 error[invalid-return-type] Return type does not match returned value: expected `str`, found `AnyStr@readlink`
scipy (https://github.com/scipy/scipy)
+ scipy/_lib/_util.py:1022:13 error[unsupported-operator] Operator `+` is not supported between objects of type `_S@map` and `Unknown | Literal[1]`
sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/ext/viewcode.py:370:12 error[unresolved-attribute] Object of type `_T@set` has no attribute `startswith`
+ sphinx/ext/viewcode.py:371:26 error[unsupported-operator] Operator `+` is not supported between objects of type `_T@set` and `Literal["."]`
+ sphinx/ext/viewcode.py:375:23 error[unresolved-attribute] Object of type `_T@set` has no attribute `startswith`
+ sphinx/ext/viewcode.py:378:26 error[unsupported-operator] Operator `+` is not supported between objects of type `_T@set` and `Literal["."]`
+ sphinx/ext/viewcode.py:381:44 error[unresolved-attribute] Object of type `_T@set` has no attribute `replace`
static-frame (https://github.com/static-frame/static-frame)
+ static_frame/core/node_iter.py:867:16 error[invalid-return-type] Return type does not match returned value: expected `IterNodeDelegate[TContainerAny@IterNode]`, found `IterNodeDelegate[Quilt]`
+ static_frame/core/node_iter.py:873:16 error[invalid-return-type] Return type does not match returned value: expected `IterNodeDelegateReducible[TContainerAny@IterNode]`, found `IterNodeDelegateReducible[Quilt]`
+ static_frame/core/node_iter.py:879:16 error[invalid-return-type] Return type does not match returned value: expected `IterNodeDelegateMapable[TContainerAny@IterNode]`, found `IterNodeDelegateMapable[Quilt]`
- static_frame/core/yarn.py:422:16 error[invalid-return-type] Return type does not match returned value: expected `InterGetItemILocReduces[Yarn[Any], object_]`, found `InterGetItemILocReduces[Yarn[Any], Frame]`
+ static_frame/core/yarn.py:422:16 error[invalid-return-type] Return type does not match returned value: expected `InterGetItemILocReduces[Yarn[Any], object_]`, found `InterGetItemILocReduces[Unknown, Frame]`
werkzeug (https://github.com/pallets/werkzeug)
- src/werkzeug/datastructures/structures.py:532:16 error[invalid-return-type] Return type does not match returned value: expected `list[V@MultiDict]`, found `V@MultiDict | list[Unknown]`
+ src/werkzeug/datastructures/structures.py:532:16 error[invalid-return-type] Return type does not match returned value: expected `list[V@MultiDict]`, found `V@MultiDict | list[V@MultiDict]`
xarray (https://github.com/pydata/xarray)
- xarray/tests/test_combine.py:92:50 error[invalid-assignment] Object of type `dict[tuple[int, ...], list[list[Dataset]] | list[Dataset] | Dataset]` is not assignable to `dict[tuple[int, ...], Dataset]`
+ xarray/tests/test_combine.py:92:50 error[invalid-assignment] Object of type `dict[tuple[int, ...], list[list[Dataset]] | Dataset | list[Dataset]]` is not assignable to `dict[tuple[int, ...], Dataset]`
Member
Author
|
ecosystem: The churn in |
Member
Author
|
ecosystem: The new diagnostics in prefect look like new instances of astral-sh/ty#3114 |
This was referenced Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
ConstraintSet::solutionsmethod returns a (set of) solutions for a constraint set — assignments of specific types to each typevar in question. #23848 introduced two variants of this method. One of them (solutions_with_inferable) would take in the set ofinferabletypevars. This was used in a cycle check at the beginning of the method, to make sure that we only considered the typevars we're actually solving for when detecting a cyclic constraint set. More importantly, it was also used to limit the result, so that we would only get solutions for ther inferable typevars (i.e., the ones that we're using the constraint set to solve for).A cleaner approach is to use extensional quantification to remove the non-inferable typevars from the constraint set before calculating solutions. We already had this available as a lower-level TDD method (
abstract_one_inner), which lets us provide an arbitraryshould_removecallback to determine which constraints to keep and which to remove. We just need to add a new public API method that provides ashould_removecallback that keeps only the constraints involving inferable typevars.Given this change we can actually remove the cyclic checks completely, since
SequentMapandPathAssignmentswill already bottom out if they encounter a cycle in the constraints. (Specifically, while we're walking TDD paths,PathAssignmentswill only add constraints that aren't already present in the current path.)