python / python/mypy

dmypy doesn't working when ignore_missing_imports in [tool.mypy] session

Open
#14,272 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug topic-configuration topic-daemon
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

Bug Report

dmypy doesn't working when ignore_missing_imports in [tool.mypy] session.
I run the command on win11.

To Reproduce

pyproject.toml

[tool.mypy]
ignore_missing_imports = true

dmypy run a.py

Restarting: configuration changed
Daemon stopped
Daemon started
Response: {'restart': 'configuration changed', 'platform': 'win32', 'python_version': '3_9', 'roundtrip_time': 0.47419118881225586}

pyproject.toml

[[tool.mypy.overrides]]
module = ["apscheduler"]
ignore_missing_imports = true

dmypy run a.py

Success: no issues found in 1 source file

Your Environment

  • Mypy version used: 0.991
  • Mypy command-line flags: dmypy run a.py
  • Mypy configuration options from pyproject.toml:
[tool.mypy]
ignore_missing_imports = true
  • Python version used: 3.9
  • os: win11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the two shown pyproject.toml configurations and the dmypy run a.py command on the reported environment. Compare the daemon's handling of the global ignore_missing_imports setting with the working override configuration; done means the global setting produces the expected successful result without an unnecessary configuration restart.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.