Empty coverage report depending on mypy call location
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
hi,
to my understanding, there's a bug in mypy coverage report generation.
talking about the --html-report and --xml-report options (haven't tested the others).
if you call mypy from a folder parallel to the location of your sources folder, the files are analyzed properly but the report is empty.
no error is showing
steps to reproduce :
- create a dummy module for mypy to analyse
- create a folder next to your sources folder
- call
mypy ../src/mod/myfile.py --xml-report empty-report - look a the file index.xml and see that myfile.py is not listed
conversely if you call mypy from the source folder, you get a proper report
see attached files for an example.
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 report-generation issue by running mypy ../src/mod/myfile.py --xml-report empty-report from a folder parallel to the source folder, then compare it with a run from the source folder. Start with the --xml-report and --html-report entry points and inspect index.xml; done means the analyzed file appears in the generated report in both locations.
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
- 42/100