Daemon mode mypy checks way more files the second time with the same command run
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Bug Report
Daemon mode mypy takes a long time to check the same file with no modifications done
To Reproduce
git clone https://github.com/Ryang20718/mypy-repro
cd mypy-repro
python3 -m venv .venv
pip install -r requirements.txt
dmypy run example/c.py
dmypy run example/c.py
Expected Behavior
I'd expect dmypy to report no issues both times, but it hangs the second time
Actual Behavior
based on the timing file, we see time spent on numpy
(.venv)mypyrepro ryang$ dmypy run example/c.py
Daemon started
Success: no issues found in 1 source file
(.venv) mypyrepro ryang$ dmypy run example/c.py
Success: no issues found in 1087 source files
Your Environment
- Mypy version used: 1.10.0
- Mypy command-line flags:
dmypy run example/c.py - Mypy configuration options from
mypy.inihttps://github.com/Ryang20718/mypy-repro/blob/main/.mypy.ini - Python version used: 3.10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the listed virtualenv, mypy.ini, and repeated dmypy run example/c.py commands. Compare the first and second runs, including the timing file and unexpected numpy checks, then trace the daemon's incremental work. Done means the unchanged second command checks only the requested file and reports the expected result without the long delay.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100