Unable to disable rich output without uninstalling rich #578
-
First Check
Commit to Help
Example Codeimport typer
app = typer.Typer()
@app.command()
def hello(name: str):
print(f"Hello {name}!")
app() DescriptionI'm trying to have the option to disable the rich output without having to uninstall rich or use a venv without rich. I've tried the "rich_markup_mode=None" and "rich_help_panel=None" None of these seem to disable rich output. Operating SystemWindows Operating System DetailsNo response Typer Version0.7.0 Python Version3.10.10 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 14 replies
-
With some help, I've created a patch script:
|
Beta Was this translation helpful? Give feedback.
-
What do you mean by "disabling rich output"? Is it the rich tracebacks that bother you? Or rich output in general? Tracebacks can be switched off, see https://stackoverflow.com/questions/76375307/how-to-make-typer-traceback-look-normal |
Beta Was this translation helpful? Give feedback.
-
Hello @tiangolo
As for me, I'm trying to use Rich library in my project with Typer, but I don't prefer default help formatting through rich. So I think it's only fair to allow the user to set up rich integrations. On the other hand, I also understand that creating an interface that allows the user to modify a rich formatting is not a quick and easy thing to do. So, the fastest way to solve the problem is to add option for disabling formatting through Rich. Right now I'm faced with the choice of either abandoning Rich or switching to Click. But I don't want to do it because I love Typer. Can you give this problem some time? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the feedback everyone! This was implemented here: #859, available since Typer 0.12.5. Would that solve your problem? 🤓 |
Beta Was this translation helpful? Give feedback.
Thanks for the feedback everyone! This was implemented here: #859, available since Typer 0.12.5.
Would that solve your problem? 🤓