-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
For a "[call-overload]" error mypy raises an error and multiple note messages.
Since we can't test for multiple messages on the same line its currently not possible to successfully test for call-overload errors.
Example:
field: str = dataclasses.field(default="A", default_factory=lambda: "B") # E: [call-overload]The error message is being tested for correctly, but there are multiple notes which cause the test to fail:
A: note: Possible overload variants:
A: note: def [_T] field(*, default: _T, init: bool = ..., repr: bool = ..., hash: bool | None = ..., compare: bool = ..., metadata: Mapping[Any, Any] | None = ..., kw_only: bool = ...) -> _T
A: note: def [_T] field(*, default_factory: Callable[[], _T], init: bool = ..., repr: bool = ..., hash: bool | None = ..., compare: bool = ..., metadata: Mapping[Any, Any] | None = ..., kw_only: bool = ...) -> _T
A: note: def field(*, init: bool = ..., repr: bool = ..., hash: bool | None = ..., compare: bool = ..., metadata: Mapping[Any, Any] | None = ..., kw_only: bool = ...) -> Any
Metadata
Metadata
Assignees
Labels
No labels