[ty] Apply narrowing to walrus targets by charliermarsh · Pull Request #22369 · astral-sh/ruff (original) (raw)
mypy_primer results
Changes were detected when running on open source projects
prefect (https://github.com/PrefectHQ/prefect)
- src/integrations/prefect-dbt/prefect_dbt/cli/commands.py:461:21: error[invalid-await]
Unknown | None | Coroutine[Any, Any, Unknown | None]is not awaitable - src/integrations/prefect-dbt/prefect_dbt/cli/commands.py:535:21: error[invalid-await]
Unknown | None | Coroutine[Any, Any, Unknown | None]is not awaitable - src/integrations/prefect-dbt/prefect_dbt/cli/commands.py:610:21: error[invalid-await]
Unknown | None | Coroutine[Any, Any, Unknown | None]is not awaitable - src/integrations/prefect-dbt/prefect_dbt/cli/commands.py:685:21: error[invalid-await]
Unknown | None | Coroutine[Any, Any, Unknown | None]is not awaitable - src/integrations/prefect-dbt/prefect_dbt/cli/commands.py:760:21: error[invalid-await]
Unknown | None | Coroutine[Any, Any, Unknown | None]is not awaitable - src/integrations/prefect-dbt/prefect_dbt/cli/commands.py:835:21: error[invalid-await]
Unknown | None | Coroutine[Any, Any, Unknown | None]is not awaitable - src/integrations/prefect-docker/tests/test_containers.py:27:47: error[invalid-argument-type] Argument is incorrect: Expected
str, foundstr | bool | dict[Unknown | str, Unknown | int] | None - src/integrations/prefect-docker/tests/test_containers.py:27:47: error[invalid-argument-type] Argument is incorrect: Expected
str | list[str] | None, foundstr | bool | dict[Unknown | str, Unknown | int] | None - src/integrations/prefect-docker/tests/test_containers.py:27:47: error[invalid-argument-type] Argument is incorrect: Expected
str | None, foundstr | bool | dict[Unknown | str, Unknown | int] | None - src/integrations/prefect-docker/tests/test_containers.py:27:47: error[invalid-argument-type] Argument is incorrect: Expected
bool | None, foundstr | bool | dict[Unknown | str, Unknown | int] | None - src/integrations/prefect-docker/tests/test_containers.py:27:47: error[invalid-argument-type] Argument is incorrect: Expected
str | list[str] | None, foundstr | bool | dict[Unknown | str, Unknown | 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, foundstr | bool | dict[Unknown | str, Unknown | int] | None - src/integrations/prefect-docker/tests/test_containers.py:27:47: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundstr | bool | dict[Unknown | str, Unknown | int] | None - src/integrations/prefect-docker/tests/test_containers.py:42:47: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundstr - src/integrations/prefect-docker/tests/test_containers.py:55:47: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundstr - src/integrations/prefect-docker/tests/test_containers.py:68:47: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundstr - src/integrations/prefect-docker/tests/test_containers.py:81:47: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundstr - src/integrations/prefect-docker/tests/test_images.py:16:44: error[invalid-argument-type] Argument is incorrect: Expected
str, foundstr | bool - src/integrations/prefect-docker/tests/test_images.py:16:44: error[invalid-argument-type] Argument is incorrect: Expected
str | None, foundstr | bool - src/integrations/prefect-docker/tests/test_images.py:16:44: error[invalid-argument-type] Argument is incorrect: Expected
str | None, foundstr | bool - src/integrations/prefect-docker/tests/test_images.py:16:44: error[invalid-argument-type] Argument is incorrect: Expected
bool, foundstr | bool - src/integrations/prefect-docker/tests/test_images.py:16:44: error[invalid-argument-type] Argument is incorrect: Expected
DockerHost | None, foundstr | bool - src/integrations/prefect-docker/tests/test_images.py:16:44: error[invalid-argument-type] Argument is incorrect: Expected
DockerRegistryCredentials | None, foundstr | bool - src/integrations/prefect-docker/tests/test_images.py:16:44: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundstr | bool - src/integrations/prefect-docker/tests/test_images.py:21:16: warning[possibly-missing-attribute] Attribute
idmay be missing on object of typeUnknown | list[Unknown] - src/integrations/prefect-docker/tests/test_images.py:29:47: error[invalid-argument-type] Argument is incorrect: Expected
bool, foundstr - src/integrations/prefect-docker/tests/test_images.py:29:47: error[invalid-argument-type] Argument is incorrect: Expected
DockerRegistryCredentials | None, foundstr - src/integrations/prefect-docker/tests/test_images.py:29:47: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundstr - src/integrations/prefect-docker/tests/test_images.py:31:16: warning[possibly-missing-attribute] Attribute
idmay be missing on object of typeUnknown | list[Unknown] - src/integrations/prefect-docker/tests/test_images.py:51:17: error[invalid-argument-type] Argument is incorrect: Expected
bool, foundstr - src/integrations/prefect-docker/tests/test_images.py:51:17: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundstr - src/integrations/prefect-docker/tests/test_images.py:53:16: warning[possibly-missing-attribute] Attribute
idmay be missing on object of typeUnknown | list[Unknown] - src/integrations/prefect-docker/tests/test_images.py:64:47: error[invalid-argument-type] Argument is incorrect: Expected
str, foundstr | bool - src/integrations/prefect-docker/tests/test_images.py:64:47: error[invalid-argument-type] Argument is incorrect: Expected
str | None, foundstr | bool - src/integrations/prefect-docker/tests/test_images.py:64:47: error[invalid-argument-type] Argument is incorrect: Expected
str | None, foundstr | bool - src/integrations/prefect-docker/tests/test_images.py:64:47: error[invalid-argument-type] Argument is incorrect: Expected
bool, foundstr | bool - src/integrations/prefect-docker/tests/test_images.py:64:47: error[invalid-argument-type] Argument is incorrect: Expected
DockerRegistryCredentials | None, foundstr | bool - src/integrations/prefect-docker/tests/test_images.py:64:47: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundstr | bool - src/integrations/prefect-kubernetes/prefect_kubernetes/jobs.py:429:17: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundstr - src/integrations/prefect-kubernetes/tests/test_custom_objects.py:20:13: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundNone - src/integrations/prefect-kubernetes/tests/test_custom_objects.py:29:13: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundNone - src/integrations/prefect-kubernetes/tests/test_custom_objects.py:38:13: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundNone - src/integrations/prefect-kubernetes/tests/test_custom_objects.py:57:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_custom_objects.py:103:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_custom_objects.py:149:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_custom_objects.py:195:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_custom_objects.py:240:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_custom_objects.py:286:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_custom_objects.py:344:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_deployments.py🔞9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_deployments.py:38:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_deployments.py:70:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_deployments.py:92:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_deployments.py:113:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_deployments.py:141:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_jobs.py:36:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_jobs.py:52:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_jobs.py:68:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_jobs.py:87:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_jobs.py:107:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_jobs.py:131:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_jobs.py:159:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_pods.py:29:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_pods.py:46:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_pods.py:78:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_pods.py:96:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_pods.py:115:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_pods.py:137:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/integrations/prefect-kubernetes/tests/test_pods.py:167:9: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Any], foundLiteral["test"] - src/prefect/cache_policies.py:311:25: warning[possibly-missing-attribute] Attribute
__code__may be missing on object of typeUnknown | ((...) -> Any)
- src/prefect/cache_policies.py:311:25: warning[possibly-missing-attribute] Attribute
__code__may be missing on object of typeUnknown | (((...) -> Any) & ((*args: object, **kwargs: object) -> object))
- src/prefect/client/utilities.py:56:20: error[invalid-return-type] Return type does not match returned value: expected
tuple[PrefectClient, bool], foundtuple[PrefectClient | SyncPrefectClient, Literal[True]] - src/prefect/deployments/runner.py:795:70: warning[possibly-missing-attribute] Attribute
__name__may be missing on object of typeUnknown | (((...) -> Any) & ((*args: object, **kwargs: object) -> object))
- src/prefect/deployments/runner.py:795:70: warning[possibly-missing-attribute] Attribute
__name__may be missing on object of typeUnknown | ((...) -> Any) - src/prefect/flow_engine.py:812:32: error[invalid-await]
Unknown | R@FlowRunEngine | Coroutine[Any, Any, R@FlowRunEngine]is not awaitable - src/prefect/flow_engine.py:1401:24: error[invalid-await]
Unknown | R@AsyncFlowRunEngine | Coroutine[Any, Any, R@AsyncFlowRunEngine]is not awaitable - src/prefect/flow_engine.py:1482:43: error[invalid-argument-type] Argument to function
nextis incorrect: ExpectedSupportsNext[Unknown], foundUnknown | R@run_generator_flow_sync - src/prefect/flow_engine.py:1490:21: warning[possibly-missing-attribute] Attribute
throwmay be missing on object of typeUnknown | R@run_generator_flow_sync - src/prefect/flow_engine.py:1524:44: warning[possibly-missing-attribute] Attribute
__anext__may be missing on object of typeUnknown | R@run_generator_flow_async - src/prefect/flow_engine.py:1531:25: warning[possibly-missing-attribute] Attribute
throwmay be missing on object of typeUnknown | R@run_generator_flow_async
- src/prefect/flows.py:286:34: error[unresolved-attribute] Object of type
((**P@Flow) -> R@Flow) & ((*args: object, **kwargs: object) -> object)has no attribute__name__
- src/prefect/flows.py:286:34: error[unresolved-attribute] Object of type
(**P@Flow) -> R@Flowhas no attribute__name__
- src/prefect/flows.py:404:68: error[unresolved-attribute] Object of type
((**P@Flow) -> R@Flow) & ((*args: object, **kwargs: object) -> object)has no attribute__name__
- src/prefect/flows.py:404:68: error[unresolved-attribute] Object of type
(**P@Flow) -> R@Flowhas no attribute__name__
- src/prefect/flows.py:1750:53: warning[unused-ignore-comment] Unused blanket
type: ignoredirective - src/prefect/task_engine.py:1613:28: error[invalid-await]
Unknown | R@AsyncTaskRunEngine | Coroutine[Any, Any, R@AsyncTaskRunEngine]is not awaitable - src/prefect/task_engine.py:1721:47: error[invalid-argument-type] Argument to function
nextis incorrect: ExpectedSupportsNext[Unknown], foundUnknown | R@run_generator_task_sync - src/prefect/task_engine.py:1734:25: warning[possibly-missing-attribute] Attribute
throwmay be missing on object of typeUnknown | R@run_generator_task_sync - src/prefect/task_engine.py:1780:48: warning[possibly-missing-attribute] Attribute
__anext__may be missing on object of typeUnknown | R@run_generator_task_async - src/prefect/task_engine.py:1792:29: warning[possibly-missing-attribute] Attribute
throwmay be missing on object of typeUnknown | R@run_generator_task_async - src/prefect/tasks.py:184:9: warning[possibly-missing-attribute] Attribute
__code__may be missing on object of typeUnknown | ((...) -> Any)
- src/prefect/tasks.py:184:9: warning[possibly-missing-attribute] Attribute
__code__may be missing on object of typeUnknown | (((...) -> Any) & ((*args: object, **kwargs: object) -> object))
- Found 5366 diagnostics
- Found 5296 diagnostics
static-frame (https://github.com/static-frame/static-frame)
- static_frame/core/bus.py:671:16: error[invalid-return-type] Return type does not match returned value: expected
InterGetItemLocReduces[Bus[Any], object_], foundInterGetItemLocReduces[Bus[Any] | Bottom[Series[Any, Any]] | ndarray[Never, Never] | ... omitted 6 union elements, object_]
- static_frame/core/bus.py:671:16: error[invalid-return-type] Return type does not match returned value: expected
InterGetItemLocReduces[Bus[Any], object_], foundInterGetItemLocReduces[Bus[Any] | Bottom[Index[Any]] | Bottom[Series[Any, Any]] | ... omitted 6 union elements, object_]
- static_frame/core/series.py:772:16: error[invalid-return-type] Return type does not match returned value: expected
InterGetItemILocReduces[Series[Any, Any], TVDtype@Series], foundInterGetItemILocReduces[Series[Any, Any] | Bottom[Index[Any]] | TypeBlocks | ... omitted 6 union elements, TVDtype@Series]
- static_frame/core/series.py:772:16: error[invalid-return-type] Return type does not match returned value: expected
InterGetItemILocReduces[Series[Any, Any], TVDtype@Series], foundInterGetItemILocReduces[Series[Any, Any] | ndarray[Never, Never] | TypeBlocks | ... omitted 6 union elements, TVDtype@Series]
- static_frame/core/series.py:4072:16: error[invalid-return-type] Return type does not match returned value: expected
InterGetItemILocReduces[SeriesHE[Any, Any], TVDtype@SeriesHE], foundInterGetItemILocReduces[Bottom[Series[Any, Any]] | Bottom[Index[Any]] | TypeBlocks | ... omitted 7 union elements, TVDtype@SeriesHE] - static_frame/core/yarn.py:418:16: error[invalid-return-type] Return type does not match returned value: expected
InterGetItemILocReduces[Yarn[Any], object_], foundInterGetItemILocReduces[Yarn[Any] | Bottom[Index[Any]] | TypeBlocks | ... omitted 6 union elements, object_]
- static_frame/core/yarn.py:418:16: error[invalid-return-type] Return type does not match returned value: expected
InterGetItemILocReduces[Yarn[Any], object_], foundInterGetItemILocReduces[Yarn[Any] | ndarray[Never, Never] | TypeBlocks | ... omitted 6 union elements, object_]
- Found 1827 diagnostics
- Found 1826 diagnostics
rotki (https://github.com/rotki/rotki)
- rotkehlchen/chain/decoding/tools.py:96:44: warning[unused-ignore-comment] Unused blanket
type: ignoredirective
- rotkehlchen/chain/decoding/tools.py:97:13: error[invalid-argument-type] Argument to function
decode_transfer_directionis incorrect: ExpectedBTCAddress | ChecksumAddress | SubstrateAddress | SolanaAddress, foundA@BaseDecoderTools
- rotkehlchen/chain/decoding/tools.py:99:13: error[invalid-argument-type] Argument to function
decode_transfer_directionis incorrect: ExpectedSequence[A@BaseDecoderTools], foundUnknown | tuple[BTCAddress, ...] | tuple[ChecksumAddress, ...] | tuple[SubstrateAddress, ...] | tuple[SolanaAddress, ...]
- rotkehlchen/chain/decoding/tools.py:98:13: error[invalid-argument-type] Argument to function
decode_transfer_directionis incorrect: ExpectedBTCAddress | ChecksumAddress | SubstrateAddress | SolanaAddress | None, foundA@BaseDecoderTools | None
- rotkehlchen/chain/decoding/tools.py💯62: warning[unused-ignore-comment] Unused blanket
type: ignoredirective
- Found 2057 diagnostics
- Found 2058 diagnostics
core (https://github.com/home-assistant/core)
- homeassistant/util/variance.py:47:12: error[invalid-return-type] Return type does not match returned value: expected
(**_P@ignore_variance) -> _R@ignore_variance, found_Wrapped[_P@ignore_variance, _R@ignore_variance | int | float | datetime, _P@ignore_variance, _R@ignore_variance | int | float | datetime] - Found 14505 diagnostics
- Found 14504 diagnostics
No memory usage changes detected ✅