Skip to content

[2.0 regression] check_call in a plugin started producing a wrong output #21427

@sobolevn

Description

@sobolevn

I faced this problem in dry-python/returns in a rather complex plugin: https://github.com/dry-python/returns/actions/runs/25487192998/job/74785711812?pr=2396

Here: https://github.com/dry-python/returns/blob/2cab87d042a2df31dcbbe77ffe7d21e0417a1121/returns/contrib/mypy/_typeops/inference.py#L121-L131

The problem is that I pass the correct types / context for checkexpr.check_call method, but the output has changed since 1.20, it started to show an incorrect error.

The same happens for a regular function call:

def convert(first: str, other: int) -> float:
    ...

reveal_type(convert(1))

Produces:

ex.py:4: note: Revealed type is "float"
ex.py:4: error: Missing positional argument "first" in call to "convert"  [call-arg]

However, first was passed, other is missing.

Metadata

Metadata

Assignees

Labels

bugmypy got something wrongtopic-callsFunction calls, *args, **kwargs, defaults

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions