Coder Social home page Coder Social logo

Comments (4)

ewels avatar ewels commented on June 10, 2024

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.

ewels avatar ewels commented on June 10, 2024

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.

mjkanji avatar mjkanji commented on June 10, 2024

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.

ewels avatar ewels commented on June 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.