Skip to content

--disallow-incomplete-defs does not print errors when run without this argument previously #4913

@srittau

Description

@srittau

I have a fairly large project that is partly type-checked. Using the following mypy.ini file it typechecks without errors:

[mypy]
ignore_missing_imports = True
; disallow_subclassing_any = True
check_untyped_defs = True
; disallow_untyped_defs = True
; disallow_incomplete_defs = True
warn_redundant_casts = True
; warn_return_any = True
warn_unused_ignores = True
warn_unused_configs = True
strict_optional = True

Running it with --disallow-incomplete-defs or --disallow-untyped-defs still produces lots of warnings.

Since upgrading to mypy 0.590, running mypy, followed by mypy --disallow-incomplete-defs will not output any warnings, although the latter command should produce loads. mypy --disallow-untyped-defs on the other hand still works. When running mypy --disallow-incomplete-defs after removing .mypy_cache or after mypy --disallow-untyped-defs, it will again print the warnings, until the next time mypy is run without arguments. --no-incremental also works around this problem.

I tried to create a minimal test case with just one file exhibiting that problem, but unfortunately that worked correctly.

I tested it with Python 3.5.5.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions