dmypy not reporting an issue that mypy finds
Open
Nobody has claimed this yet.
bug
crash
topic-daemon
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Bug Report
packaging on enriched-metadata [!⇡] via 🐍 v3.11.4 (.venv)
❯ PYTHONPATH=/mnt/c/Users/brcan/.vscode-insiders/extensions/ms-python.mypy-type-checker-2023.1.11921011/bundled/libs /hom
e/brettcannon/Repositories/pypa/packaging/.venv/bin/python -m mypy --no-color-output --no-error-summary --show-absolute-p
ath --show-column-numbers --show-error-code --no-pretty --follow-imports=normal --show-error-end /home/brettcannon/Reposi
tories/pypa/packaging/src/packaging/metadata.py
/home/brettcannon/Repositories/pypa/packaging/src/packaging/metadata.py:303:18:303:24: error: Item "None" of "list[Any] | None" has no attribute "__iter__" (not iterable) [union-attr]
/home/brettcannon/Repositories/pypa/packaging/src/packaging/metadata.py:604:5:624:86: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
⏎
packaging on enriched-metadata [+⇡] via 🐍 v3.11.4 (.venv)
❯ PYTHONPATH=/mnt/c/Users/brcan/.vscode-insiders/extensions/ms-python.mypy-type-checker-2023.1.11921011/bundled/libs
/home/brettcannon/Repositories/pypa/packaging/.venv/bin/python -m mypy.dmypy --status-file /tmp/.vscode.dmypy_statu
s/status-55f8413f-94ce-437f-9911-110647253f9d.json run -- --no-color-output --no-error-summary --show-absolute-path
--show-column-numbers --show-error-code --no-pretty --follow-imports=normal --show-error-end /home/brettcannon/Repos
itories/pypa/packaging/src/packaging/metadata.py
packaging on enriched-metadata [+⇡] via 🐍 v3.11.4 (.venv)
To Reproduce
See above.
Expected Behavior
Issues reported by mypy to also be reported by dmypy.
Actual Behavior
dmypy not printing any issues.
Your Environment
- Mypy version used: mypy 1.4.1 (compiled: no)
- Mypy command-line flags:
- Mypy configuration options from
mypy.ini(and other config files): https://github.com/pypa/packaging/blob/1277904652c497ec84560a830a2e01d434358818/pyproject.toml#L51-L54 - Python version used: 3.11.4
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
Start by reproducing the reported commands against packaging/src/packaging/metadata.py, comparing the regular mypy and dmypy outputs with mypy 1.4.1 and the listed flags. Trace the dmypy command path and add a regression test for the discrepancy. Done means dmypy reports the same issues as mypy for this case.
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
- 45/100