dmypy only formats output in json the first time it's executed
Open
Nobody has claimed this yet.
bug
topic-daemon
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Bug Report
dmypy only outputs in json the first time it's invoked with --output=json.
To Reproduce
dmypy stop
dmypy run -- --output=json
dmypy run -- --output=json
Expected Behavior
Every invocation returns JSON.
Actual Behavior
Only the first one does.
$ dmypy run -- --output=json
Daemon started
{"file": "myfile.py", "line": 3, "column": 0, "message": "Function is missing a type annotation", "hint": null, "code": "no-untyped-def", "severity": "error"}
$ dmypy run -- --output=json
a_different_file.py:22: error: Missing type parameters for generic type "Query" [type-arg]
Your Environment
mypy --version
mypy 1.15.0 (compiled: yes)
python --version
Python 3.11.11
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 behavior with the reported dmypy stop and repeated dmypy run -- --output=json commands, then trace the dmypy run output handling. Done means every invocation emits JSON rather than only the first one; no specific source file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100