Set a Click context where colors are disabled. Creates a throwaway Command to play nicely with the Context constructor. The intended side-effect here is that click.echo() checks this context and will suppress colors. https://github.com/pallets/click/blob/e1aa43a3/click/globals.p
()
| 3609 | |
| 3610 | |
| 3611 | def disable_click_colors(): |
| 3612 | """ |
| 3613 | Set a Click context where colors are disabled. Creates a throwaway Command |
| 3614 | to play nicely with the Context constructor. |
| 3615 | The intended side-effect here is that click.echo() checks this context and will |
| 3616 | suppress colors. |
| 3617 | https://github.com/pallets/click/blob/e1aa43a3/click/globals.py#L39 |
| 3618 | """ |
| 3619 | |
| 3620 | ctx = Context(Command("AllYourBaseAreBelongToUs")) |
| 3621 | ctx.color = False |
| 3622 | push_context(ctx) |
| 3623 | |
| 3624 | |
| 3625 | def handle(): # pragma: no cover |
no outgoing calls