You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using click commands, click.get_current_context().color = False allows to disable colors globally, instead of specifying it in each secho(..., color=False) call.
We have a python program that uses click just for the styled output, that is, style(), secho(), and echo(), which causes the current click context to be None. Is there a way to create a fake global context so we can set color=False only once within the program?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When using click commands,
click.get_current_context().color = False
allows to disable colors globally, instead of specifying it in eachsecho(..., color=False)
call.We have a python program that uses click just for the styled output, that is,
style()
,secho()
, andecho()
, which causes the current click context to be None. Is there a way to create a fake global context so we can set color=False only once within the program?Beta Was this translation helpful? Give feedback.
All reactions