Skip to content
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

Add rich print using _get_rich_console #509

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

feluelle
Copy link

@feluelle feluelle commented Nov 21, 2022

This feature allows using rich's print in typer context.

It uses the _get_rich_console to make it more aware of the terminal it sits in. For example, this can be useful if you want to set TERMINAL_WIDTH.

@github-actions
Copy link

📝 Docs preview for commit 3b157c1 at: https://637b5b9082dd302494a34f0a--typertiangolo.netlify.app

@github-actions
Copy link

📝 Docs preview for commit 41e055f at: https://637bad2009b1d000aa0c4ef3--typertiangolo.netlify.app

@github-actions
Copy link

📝 Docs preview for commit 7aa8580 at: https://637ca37be26a2376b30fe6f5--typertiangolo.netlify.app

@feluelle
Copy link
Author

@tiangolo I would appreciate a review on this one.

cc @willmcgugan as the author of this module (and rich ❤️)

We might want to change how we load the configuration such as TERMINAL_WIDTH here. WDYT?

feluelle added a commit to astronomer/astro-sdk that referenced this pull request Nov 22, 2022
Instead of changing the stdout via get_stdout, we just set the
TERMINAL_WIDTH to a very large number to avoid new lines. The
configuration has been copied from
https://github.com/tiangolo/typer/blob/master/scripts/test.sh

**EDIT:**

I have also created tiangolo/typer#509 to fix
that in typer.
@github-actions
Copy link

📝 Docs preview for commit a554497 at: https://637dec7bc6ae7d0db6b689fb--typertiangolo.netlify.app

@github-actions
Copy link

📝 Docs preview for commit a02e793 at: https://639ce9aa9c18df08c1c84069--typertiangolo.netlify.app

@svlandeg svlandeg added feature New feature, enhancement or request p3 labels Mar 1, 2024
@feluelle
Copy link
Author

@tiangolo please take a look - all tests have passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature, enhancement or request p3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants