-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Make mypy more positive #7368
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
Comments
My gut inclination is for silence in the success case. (Although certainly our internal wrapper scripts are all very noisy?) |
|
I don't have a strong opinion about this, but at least printing something when there is nothing to report might help new users. It could also be useful to print something like "no issues found in 35 files". One possible failure mode is accidentally checking only a small number of files, when imports aren't being followed. I think it would make sense to do a quick survey of what other popular developer tools report on success (both Python and non-Python tools). |
Here are a few:
|
Another reason for preferring a success/summary message is that otherwise multiple mypy runs can be hard to distinguish in a terminal. Here's an actual example:
Here's the same with a summary message:
I think that it's easier to see where the new run beings in the second example. Colors (#7410) would also help with this. |
That's worst idea ever. How I am supposed to use mypy in CI/CD now???????????? Please undo it |
Maybe someone already noticed this, but IMO mypy is a bit "grumpy". Currently mypy never says anything good to a user. If there are no errors, then the output is just empty. This can even cause some confusion for a new user trying it on a simple clean file.
What do you think about emitting a simple message like
Success: no issues found
if there are no errors/notes emitted during type checking?Btw, we can also optionally add a summary line if there are errors saying something like
N issues found in M files
. I often want to check how many errors there are and this forces me to re-run mypy with| grep error | wc -l
.The text was updated successfully, but these errors were encountered: