[ty] Add a diagnostic for Final without assignment by charliermarsh · Pull Request #23001 · astral-sh/ruff (original) (raw)
mypy_primer results
Changes were detected when running on open source projects
pydantic (https://github.com/pydantic/pydantic)
- pydantic/_internal/_core_metadata.py:87:54: error[invalid-assignment] Invalid assignment to key "pydantic_js_extra" with declared type
dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | ((dict[str, Divergent], type[Any], /) -> None)on TypedDictCoreMetadata: value of typedict[object, object]
- pydantic/_internal/_core_metadata.py:87:54: error[invalid-assignment] Invalid assignment to key "pydantic_js_extra" with declared type
dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | ((dict[str, int | float | str | ... omitted 3 union elements], type[Any], /) -> None)on TypedDictCoreMetadata: value of typedict[object, object]
- pydantic/fields.py:949:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None
- pydantic/fields.py:949:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None
- pydantic/fields.py:989:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None
- pydantic/fields.py:989:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None
- pydantic/fields.py:1032:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None
- pydantic/fields.py:1032:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None
- pydantic/fields.py:1072:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None
- pydantic/fields.py:1072:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None
- pydantic/fields.py:1115:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None
- pydantic/fields.py:1115:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None
- pydantic/fields.py:1154:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None
- pydantic/fields.py:1154:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None
- pydantic/fields.py:1194:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None
- pydantic/fields.py:1194:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None
- pydantic/fields.py:1573:13: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None, foundTop[dict[Unknown, Unknown]] | (((dict[str, Divergent], /) -> None) & ~Top[dict[Unknown, Unknown]]) | None
- pydantic/fields.py:1573:13: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None, foundTop[dict[Unknown, Unknown]] | (((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) & ~Top[dict[Unknown, Unknown]]) | None
prefect (https://github.com/PrefectHQ/prefect)
- src/integrations/prefect-dbt/prefect_dbt/core/settings.py:94:28: error[invalid-assignment] Object of type
dict[str, Any] | int | dict[Any, 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
int | dict[Any, Any] | float | ... omitted 3 union elementsis not assignable todict[str, Any] - src/prefect/cli/deploy/_core.py:87:21: error[invalid-assignment] Object of type
dict[str, Any] | int | dict[Any, Any] | ... omitted 4 union elementsis not assignable todict[str, Any] - src/prefect/cli/deploy/_core.py:88:21: error[invalid-assignment] Object of type
int | dict[Any, Any] | float | ... omitted 3 union elementsis not assignable todict[str, Any]
- src/prefect/deployments/runner.py:1017: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:1017:70: warning[possibly-missing-attribute] Attribute
__name__may be missing on object of typeUnknown | ((...) -> Any) - src/prefect/deployments/steps/core.py:137:38: error[invalid-argument-type] Argument is incorrect: Argument type
dict[str, Any] | int | dict[Any, Any] | ... omitted 4 union elementsdoes not satisfy constraints (str,int,int | float,bool,dict[Any, Any],list[Any],None) of type variableT - src/prefect/flow_engine.py:997:32: error[invalid-await]
Unknown | R@FlowRunEngine | Coroutine[Any, Any, R@FlowRunEngine]is not awaitable - src/prefect/flow_engine.py:1596:24: error[invalid-await]
Unknown | R@AsyncFlowRunEngine | Coroutine[Any, Any, R@AsyncFlowRunEngine]is not awaitable - src/prefect/flow_engine.py:1677:43: error[invalid-argument-type] Argument to function
nextis incorrect: ExpectedSupportsNext[Unknown], foundUnknown | R@run_generator_flow_sync - src/prefect/flow_engine.py:1685:21: warning[possibly-missing-attribute] Attribute
throwmay be missing on object of typeUnknown | R@run_generator_flow_sync - src/prefect/flow_engine.py:1719:44: warning[possibly-missing-attribute] Attribute
__anext__may be missing on object of typeUnknown | R@run_generator_flow_async - src/prefect/flow_engine.py:1726:25: warning[possibly-missing-attribute] Attribute
throwmay be missing on object of typeUnknown | R@run_generator_flow_async
- src/prefect/flows.py:285:34: error[unresolved-attribute] Object of type
((**P@Flow) -> R@Flow) & ((*args: object, **kwargs: object) -> object)has no attribute__name__
- src/prefect/flows.py:285:34: error[unresolved-attribute] Object of type
(**P@Flow) -> R@Flowhas no attribute__name__
- src/prefect/flows.py:403:68: error[unresolved-attribute] Object of type
((**P@Flow) -> R@Flow) & ((*args: object, **kwargs: object) -> object)has no attribute__name__
- src/prefect/flows.py:403:68: error[unresolved-attribute] Object of type
(**P@Flow) -> R@Flowhas no attribute__name__
- src/prefect/flows.py:1885:53: warning[unused-type-ignore-comment] Unused blanket
type: ignoredirective
- src/prefect/flows.py:1945:21: error[no-matching-overload] No overload of function
run_coro_as_syncmatches arguments
- src/prefect/utilities/templating.py:320:13: error[invalid-assignment] Invalid subscript assignment with key of type
objectand value of typeUnknown | 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 typedict[str, Any] | int | Unknown | ... 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[Unknown | dict[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[Unknown | dict[str, Any] | int | ... omitted 4 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, 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, Unknown | int | float | ... omitted 4 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[Unknown]
- src/prefect/utilities/templating.py:442:16: error[invalid-return-type] Return type does not match returned value: expected
T@resolve_variables, foundlist[Unknown | int | float | ... omitted 4 union elements]
- src/prefect/workers/base.py:234: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 variableT
- src/prefect/workers/base.py:234:13: error[invalid-argument-type] Argument is incorrect: Argument type
dict[str, Any] | int | str | ... omitted 3 union elementsdoes not satisfy constraints (str,int,int | float,bool,dict[Any, Any],list[Any],None) of type variableT - src/prefect/workers/base.py:236:22: error[invalid-argument-type] Argument expression after ** must be a mapping type: Found
int | Unknown | float | ... omitted 4 union elements
- Found 5386 diagnostics
- Found 5398 diagnostics
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 51 diagnostics
- Found 50 diagnostics
hydpy (https://github.com/hydpy-dev/hydpy)
- hydpy/core/modeltools.py:858:24: warning[unused-type-ignore-comment] Unused blanket
type: ignoredirective - hydpy/core/modeltools.py:910:24: warning[unused-type-ignore-comment] Unused blanket
type: ignoredirective - Found 662 diagnostics
- Found 660 diagnostics
static-frame (https://github.com/static-frame/static-frame)
- static_frame/core/bus.py:645:16: error[invalid-return-type] Return type does not match returned value: expected
InterGetItemLocReduces[Bus[Any], object_], foundInterGetItemLocReduces[Bottom[Bus[Any]] | IndexHierarchy | TypeBlocks | ... omitted 6 union elements, object_] - static_frame/core/bus.py:649:16: error[invalid-return-type] Return type does not match returned value: expected
InterGetItemILocReduces[Bus[Any], object_], foundInterGetItemILocReduces[Bottom[Bus[Any]] | IndexHierarchy | TypeBlocks | ... omitted 7 union elements, Self@iloc]
- static_frame/core/bus.py:649:16: error[invalid-return-type] Return type does not match returned value: expected
InterGetItemILocReduces[Bus[Any], object_], foundInterGetItemILocReduces[Self@iloc, Self@iloc]
- 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[Bottom[Series[Any, Any]] | IndexHierarchy | TypeBlocks | ... omitted 7 union elements, TVDtype@Series] - static_frame/core/series.py:4071: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[Bottom[Yarn[Any]] | Bottom[Index[Any]] | Bottom[Series[Any, Any]] | ... omitted 7 union elements, object_] - Found 1832 diagnostics
- Found 1828 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, int | _R@ignore_variance | float | datetime, _P@ignore_variance, _R@ignore_variance | int | float | datetime]
- Found 14517 diagnostics
- Found 14518 diagnostics
No memory usage changes detected ✅