-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Make the CLI less verbose #4594
Comments
This has been discussed previously, and we decided against it. The current information output by the cli is there for a reason. |
I forgot to mention that there is an |
Maybe at least the |
Anyone reading this issue may like to give this a try: https://github.com/jamielinux/pyright-polite It's a cross-platform wrapper for pyright that gets rid of unnecessary output, preserves pyright's colorisation, and supports It's hilariously over-engineered 🤣 but was mainly a fun weekend project to play around with asyncio. |
Can you explain? I don't see how an optional |
I'm revisiting this issue since it has gotten numerous thumbs-ups. I've changed the CLI to limit its output by default. If you use Thanks @jamielinux for posting your formatter, and apologies for making it obsolete. |
Thank you @erictraut ! 🎉
Heh, no problem, pyright-polite's goal in life was to become obsolete! |
This is addressed in pyright 1.1.306, which I just published. |
For people who want even less verbose output (similar to pyright src/ | grep -Po "(?<=$PWD/)(.*:.*)" # does not preserve color
script -c "pyright src" /dev/null | grep --color=never -Po "(?<=$PWD/)(.*:.*)" # preserves color e.g. - repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.361
hooks:
- id: pyright
entry: sh -c '! script -c "pyright $*" /dev/null | grep --color=never -Po "(?<=$PWD/)(.*:.*)"' -- |
Is your feature request related to a problem? Please describe.
The
pyright
cli is very verbose, it prints a lot of uninteresting debug-style output that can not be suppressed, which makes visually parsing the output harder than it needs to be.In my opinion, well-behaved CLIs should be silent on success and only print the actual valuable parts (the errors,warnings and informations) by default,
eslint
cli is a good example that does just that.Describe the solution you'd like
Reduce default cli output from
to
Additional context
Existing output could be moved to the existing
--verbose
flag. If backwards compatibility is a concern, the new reduced output style could be used when a--silent
or--quiet
flag is given.The text was updated successfully, but these errors were encountered: