Number of source files checked in output is misleading with -m specifiers
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Bug Report
I had a test directory with several files in it. When I switched from mypy test/ to mypy -m test, I found that the output at the result became a bit misleading:
-Found 80 errors in 2 files (checked 32 source files)
+Found 80 errors in 2 files (checked 3 source files)
To Reproduce
mkdir test
touch test/__init__.py test/a.py test/b.py
mypy test/
mypy -m test
Expected Behavior
I would expect the same output in both cases.
There are probably alternate acceptable behaviors - but this one is confusing.
Your Environment
- Mypy version used: .990
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 running the reported reproduction with mypy test/ and mypy -m test using the listed commands. Trace how source files are counted for directory versus module arguments, then make the resulting summary consistent and verify that both commands report the same number of checked source files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100