Skip to content

Suggestion: write messages to stdout instead of stderr #1051

Closed
@gvanrossum

Description

@gvanrossum

I often want to grep mypy's output for certain messages (or to strip certain messages) and this is a little tricky because the messages are written to stderr. So I have to do e.g.

mypy file.py 2>&1 | grep -v note

instead of

mypy file.py | grep -v note

I think the only things that should be written to stderr are command line syntax errors (where it refuses to run) or fatal errors like tracebacks. Syntax errors in the modules to be analyzed should probably go to stdout (though since these abort processing it might be okay to send these to stderr).

Also -h output should go to stdout IMO (this is how argparse does things -- it would also be nice to rewrite the argument parsing using argparse).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions