How can I use Panel.fit (from rich) instead of the Panel default in both the help message and Typer App argument errors?
#607
Replies: 5 comments 3 replies
-
|
What a good suggestion! I agree that the error message looks much better with |
Beta Was this translation helpful? Give feedback.
-
|
Bump |
Beta Was this translation helpful? Give feedback.
-
|
I'd also like this very much, see #680 Setting See: However, setting |
Beta Was this translation helpful? Give feedback.
-
|
I figured it out. 😁 The reason Now "all" we need to do is make a PR to expose it through the Typer API and make it configurable for the end user. 😅 |
Beta Was this translation helpful? Give feedback.
-
|
Yes, Panel.fit() would be nice, or a Edit: Thinking about this still. I wonder how other projects deal with this? Do people not work with their terminals in fullscreen? Or maybe project maintainers just don't care that it looks weird? Anyways, I think it would be great to get @harkabeeparolus PR merged. I've had a look at it and it doesn't seem that intrusive - should be easy to review for someone with knowledge of the typer codebase. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
I want to use
Panel.fitinstead of thePaneldefault on help messages and argument error messages.Default behaviour:

Example of the behaviour I want to achieve:

P.D: To obtain the second image i used the following code:
However, this only affects error panels and the help message remains the same. How can I do this for both types of messages?
Operating System
Linux
Operating System Details
No response
Typer Version
0.9.0
Python Version
Python 3.11.3
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions