-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dmypy not reporting an issue that mypy finds #15677
Comments
Hmm, I wasn't able to reproduce. I ran several variants of:
(Also curious that you're using uncompiled mypy, don't expect that to make a difference, but I'll try with that later) |
You need to first run it on a file that does not have any reported problems:
|
I think I have found the underlying cause, though I am not sure what the correct solution is. I tested, and adding Test project setup (was using an existing project when I came across the issue):
I tested both with entire code base and individual "base.py" as input to the following command: poetry run python -m mypy.dmypy --status-file test.json run -- --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-code --no-pretty --show-error-end [input]
In the initial run when the daemon loads, it does a full build (calling When run with The calls from there are: Root causeAt this point a In my case, this is the mix of things causing this:
In short, mypy marks it as a "silently imported module that is not a root source" and instructs it to ignore all errors. It looks like this was discovered and fixed in this PR previously: #14060.
Suggested fixIt seems like the initial section of @JukkaL You did the initial fix, I hope this might make sense to you and that you might have a good idea of how this could be fixed. It is breaking the |
mypy-type-checker currently has a bug where errors detected by dmypy don't show up (python/mypy#15677) so don't use it until this is fixed.
To repro with latest mypy master:
Gives:
|
Bug Report
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.ini
(and other config files): https://github.com/pypa/packaging/blob/1277904652c497ec84560a830a2e01d434358818/pyproject.toml#L51-L54The text was updated successfully, but these errors were encountered: