Test Setup Failed
Push — master ( 4c7575...8ed87e )
by Jace
01:18
created

main()   A

Complexity

Conditions 2

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
dl 0
loc 9
rs 9.6666
1
import logging
2
3
import click
4
5
from . import utils
6
7
log = logging.getLogger(__name__)
8
9
10
@click.command()
11
@click.option('--init', is_flag=True, help="Generate a sample config file.")
12
def main(init=False):
13
    logging.basicConfig(level=logging.INFO)
14
15
    if init:
16
        config = utils.init_config()
17
        click.echo(f"Created {config.path}")
18
19
20
if __name__ == '__main__':  # pragma: no cover
21
    main()
22