Skip to content

Errors not always reported for a file in incremental mode #4043

Closed
@JukkaL

Description

@JukkaL

Sometimes mypy doesn't generate an error for a module in incremental mode, even if a previous run generated errors and nothing has changed.

To reproduce, first create these two files:

# a.py
import b
b.f()
# b.py
def f() -> None: pass

Then run mypy, and no errors are reported (as expected):

$ mypy -i a.py

Now edit b.py like this:

# b.py (2)
def f(x) -> None: pass

Run mypy again, and it correctly reports an error:

$ mypy -i a.py
a.py:3: error: Too few arguments for "f"

Finally, run mypy again without changing anything, and it incorrectly gives clean output:

$ mypy -i a.py
$    <--- no error reported

The expected output is the same error as in the previous run, since nothing has changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions