Comments (4)
Any ideas on how we can do this whilst still using our own rich
console? If we defer errors to click I'm not sure how we would be able to keep control over output to the terminal.
from rich-click.
Oh wait, I think I misunderstood. You just mean terminal output from errors is currently going to stdout and it should be stderr? I see no problem with that..
from rich-click.
Oh wait, I think I misunderstood. You just mean terminal output from errors is currently going to stdout and it should be stderr? I see no problem with that..
That's exactly it! As for the implementation, Rich already supports creating consoles that output to stderr. Please see here:
https://rich.readthedocs.io/en/stable/console.html#error-console
The rich.print
function also supports setting file=sys.stderr
to achieve the same.
from rich-click.
Yup, should be pretty simple 👍🏻 Will get to it when I can, or if you fancy putting in a PR that would be even better. It'd be nice to emulate native click behaviour.
Note that I still don't 100% understand how this impacts CI/CD.. You just mean that the tests would be listening to stderr and so miss the output? They could equally listen to stdout, no? But it doesn't really matter, I think it would be a good change either way.
Phil
from rich-click.
Related Issues (20)
- Command Aliases? HOT 4
- options inherited from context settings aren't applied (#2) HOT 1
- Inconsistent highlighting in help section HOT 9
- Allow adding extra lines to separate commands/parameters HOT 7
- Typer AttributeError in latest release HOT 3
- Default colors hard to read on Windows terminals HOT 7
- Markup and rich formatting in click.echo HOT 5
- `py.typed` not getting distributed HOT 11
- Hyperlinks seems not working when using with Typer HOT 3
- Are custom group classes supported? HOT 1
- Hide env var defaults for automatically generated completion flags HOT 1
- Untyped decorator issue with rich-click HOT 4
- Rich-click does not format nested commands HOT 7
- Provide help message when --help is used in a cli with required arguments HOT 2
- Rich Click breaks contract of Click's `format_help` and its callers
- Make `rich-click` extensible and isolate configuration state HOT 3
- Multiple times argument usage HOT 1
- Click fails in command
- Broken image links on PyPI page for rich-click HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rich-click.