Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dmypy] special case stdout and stderr in show_stats too (#15881)
When running dmypy, the communication between client and server is via JSON. The JSON contains the keys "out" and "err" for the actual result of "check" command, and "stdout" and "stderr" for the any other stdout and stderr text. show_stats is shown when running with --verbose. It's meant to show other keys in the JSON response, like python version or time taken. It already had some special casing to only show 1 line of text for "out" and "err". Let's add "stdout" and "stderr" to the special casing as well. Also, let's show the remaining number of characters as well. Finally, added a comment in code about stdout, stderr, out, err and how we shouldn't confuse them. (I did) Some more cleanup is needed in this area of the codebase, but will be a separate PR. show_stats outputs something like this: ``` err : out : analytics/scripts/presto/report_query_lo ... 100 more characters platform : linux python_version : 3_9 roundtrip_time : 31.996 status : 2 stderr : \nLOG: Mypy Version: 1.6.0+de ... 50186630 more characters stdout : ```
- Loading branch information
76c16a4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error
field is also important,mypy/mypy/dmypy_server.py
Line 238 in 7f65cc7