[ty] Fix iteration over intersections with TypeVars whose bounds contain non-iterable types by charliermarsh · Pull Request #22117 · astral-sh/ruff (original) (raw)
mypy_primer results
Changes were detected when running on open source projects
tornado (https://github.com/tornadoweb/tornado)
- tornado/gen.py:255:62: error[invalid-argument-type] Argument to bound method
__init__is incorrect: ExpectedNone | Awaitable[Unknown] | list[Awaitable[Unknown]] | dict[Any, Awaitable[Unknown]] | Future[Unknown], found_T@next | _T@next | _VT@next
- tornado/gen.py:255:62: error[invalid-argument-type] Argument to bound method
__init__is incorrect: ExpectedNone | Awaitable[Unknown] | list[Awaitable[Unknown]] | dict[Any, Awaitable[Unknown]] | Future[Unknown], found_T@next | _VT@next | _T@next
artigraph (https://github.com/artigraph/artigraph)
- src/arti/internal/type_hints.py:172:46: error[invalid-argument-type] Argument to function
lenient_issubclassis incorrect: Argument typeobjectdoes not satisfy upper boundtype | tuple[type, ...]of type variableT - Found 145 diagnostics
- Found 144 diagnostics
prefect (https://github.com/PrefectHQ/prefect)
- src/integrations/prefect-dbt/prefect_dbt/core/settings.py:94:28: error[invalid-assignment] Object of type
T@resolve_block_document_references | dict[str, Any]is not assignable todict[str, Any]
- src/integrations/prefect-dbt/prefect_dbt/core/settings.py:94:28: error[invalid-assignment] Object of type
T@resolve_block_document_references | int | dict[str, Any] | ... omitted 4 union elementsis not assignable todict[str, Any]
- src/integrations/prefect-dbt/prefect_dbt/core/settings.py:99:28: error[invalid-assignment] Object of type
T@resolve_variables | dict[str, Any]is not assignable todict[str, Any]
- src/integrations/prefect-dbt/prefect_dbt/core/settings.py:99:28: error[invalid-assignment] Object of type
T@resolve_variables | str | int | ... omitted 4 union elementsis not assignable todict[str, Any]
- src/prefect/cli/deploy/_core.py:86:21: error[invalid-assignment] Object of type
T@resolve_block_document_references | dict[str, Any]is not assignable todict[str, Any]
- src/prefect/cli/deploy/_core.py:86:21: error[invalid-assignment] Object of type
T@resolve_block_document_references | int | dict[str, Any] | ... omitted 4 union elementsis not assignable todict[str, Any]
- src/prefect/cli/deploy/_core.py:87:21: error[invalid-assignment] Object of type
T@resolve_variablesis not assignable todict[str, Any]
- src/prefect/cli/deploy/_core.py:87:21: error[invalid-assignment] Object of type
T@resolve_variables | str | int | ... omitted 4 union elementsis not assignable todict[str, Any]
- src/prefect/deployments/steps/core.py:137:38: error[invalid-argument-type] Argument is incorrect: Expected
T@resolve_variables, foundT@resolve_block_document_references | dict[str, Any]
- src/prefect/deployments/steps/core.py:137:38: error[invalid-argument-type] Argument is incorrect: Expected
T@resolve_variables, foundT@resolve_block_document_references | int | dict[str, Any] | ... omitted 4 union elements
- src/prefect/utilities/templating.py:320:13: error[invalid-assignment] Invalid subscript assignment with key of type
objectand value of typeT@resolve_block_document_references | dict[str, Any]on object of typedict[str, Any]
- src/prefect/utilities/templating.py:320:13: error[invalid-assignment] Invalid subscript assignment with key of type
objectand value of typeT@resolve_block_document_references | int | dict[str, Any] | ... omitted 4 union elementson object of typedict[str, Any]
- src/prefect/utilities/templating.py:323:16: error[invalid-return-type] Return type does not match returned value: expected
T@resolve_block_document_references | dict[str, Any], foundlist[T@resolve_block_document_references | dict[str, Any] | Unknown]
- src/prefect/utilities/templating.py:323:16: error[invalid-return-type] Return type does not match returned value: expected
T@resolve_block_document_references | dict[str, Any], foundlist[T@resolve_block_document_references | int | dict[str, Any] | ... omitted 5 union elements]
- src/prefect/utilities/templating.py:437:16: error[invalid-return-type] Return type does not match returned value: expected
T@resolve_variables, founddict[object, T@resolve_variables | Unknown]
- src/prefect/utilities/templating.py:437:16: error[invalid-return-type] Return type does not match returned value: expected
T@resolve_variables, founddict[object, T@resolve_variables | str | int | ... omitted 5 union elements]
- src/prefect/utilities/templating.py:442:16: error[invalid-return-type] Return type does not match returned value: expected
T@resolve_variables, foundlist[T@resolve_variables | Unknown]
- src/prefect/utilities/templating.py:442:16: error[invalid-return-type] Return type does not match returned value: expected
T@resolve_variables, foundlist[T@resolve_variables | str | int | ... omitted 5 union elements]
- src/prefect/workers/base.py:232:13: error[invalid-argument-type] Argument is incorrect: Expected
T@resolve_variables, foundT@resolve_block_document_references | dict[str, Any]
- src/prefect/workers/base.py:232:13: error[invalid-argument-type] Argument is incorrect: Expected
T@resolve_variables, foundT@resolve_block_document_references | int | dict[str, Any] | ... omitted 4 union elements
- src/prefect/workers/base.py:234:20: error[invalid-argument-type] Argument expression after ** must be a mapping type: Found
T@resolve_variables
- src/prefect/workers/base.py:234:20: error[invalid-argument-type] Argument expression after ** must be a mapping type: Found
T@resolve_variables | str | int | ... omitted 4 union elements
scikit-build-core (https://github.com/scikit-build/scikit-build-core)
- src/scikit_build_core/build/wheel.py:99:20: error[no-matching-overload] No overload of bound method
__init__matches arguments
- Found 46 diagnostics
- Found 47 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:675:16: error[invalid-return-type] Return type does not match returned value: expected
InterGetItemILocReduces[Bus[Any], object_], foundInterGetItemILocReduces[Self@iloc | Bus[Any], object_ | Self@iloc]
- static_frame/core/bus.py:675:16: error[invalid-return-type] Return type does not match returned value: expected
InterGetItemILocReduces[Bus[Any], object_], foundInterGetItemILocReduces[Bus[Any] | Bottom[Index[Any]] | TypeBlocks | ... omitted 6 union elements, object_ | Self@iloc]
- 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]] | ndarray[Never, Never] | TypeBlocks | ... omitted 7 union elements, TVDtype@SeriesHE]
- 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_]
- Found 1823 diagnostics
- Found 1825 diagnostics
pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
- tests/frame/test_groupby.py:229:15: error[type-assertion-failure] Type
Series[Any]does not match asserted typeSeries[str | bytes | int | ... omitted 12 union elements] - tests/frame/test_groupby.py:625:15: error[type-assertion-failure] Type
Series[Any]does not match asserted typeSeries[str | bytes | int | ... omitted 12 union elements] - Found 4353 diagnostics
- Found 4351 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 2056 diagnostics
- Found 2057 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 14496 diagnostics
- Found 14497 diagnostics
No memory usage changes detected ✅