cli.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:Zappa 作者: Miserlou 项目源码 文件源码
def disable_click_colors():
    """
    Set a Click context where colors are disabled. Creates a throwaway BaseCommand
    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.py#L39
    """

    ctx = Context(BaseCommand('AllYourBaseAreBelongToUs'))
    ctx.color = False
    push_context(ctx)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号