<gh_stars>1-10
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
u"""
Created by <EMAIL> at 2019.01.02

Tests click
"""
import click


@click.group(invoke_without_command=True)
@click.option('--debug/--no-debug', default=False)
@click.pass_context
def cli(ctx, debug):
    ctx.obj['DEBUG'] = debug


@cli.command()
@click.pass_context
def sync(ctx):
    click.echo('Debug is %s' % (ctx.obj['DEBUG'] and 'on' or 'off'))


if __name__ == '__main__':
    cli(obj={})
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
u"""
Created by <EMAIL> at 2019.01.02

Tests click
"""
import click


@click.group(invoke_without_command=True)
@click.option('--debug/--no-debug', default=False)
@click.pass_context
def cli(ctx, debug):
    ctx.obj['DEBUG'] = debug


@cli.command()
@click.pass_context
def sync(ctx):
    click.echo('Debug is %s' % (ctx.obj['DEBUG'] and 'on' or 'off'))


if __name__ == '__main__':
    cli(obj={})
#!/usr/bin/env python3 # -*- coding:utf-8 -*- Created by <EMAIL> at 2019.01.02  Tests click