Completed
Push — develop ( fea62d...40913a )
by Jace
02:59
created

main()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1.125

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 5
ccs 2
cts 4
cp 0.5
crap 1.125
rs 9.4285
1 1
import logging
2
3 1
import click
0 ignored issues
show
Configuration introduced by
The import click could not be resolved.

This can be caused by one of the following:

1. Missing Dependencies

This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.

# .scrutinizer.yml
before_commands:
    - sudo pip install abc # Python2
    - sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use the command for the correct version.

2. Missing __init__.py files

This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.

Loading history...
4
5 1
from . import VERSION
6
7
8 1
log = logging.getLogger(__name__)
9
10
11 1
@click.group()
12 1
@click.version_option(message=VERSION)
13
def main():
14
    logging.basicConfig(level=logging.INFO)
15
    logging.getLogger('yorm').setLevel(logging.WARNING)
16
17
18 1
@main.command()
19
def new():
20
    # TODO: this logic is only temporary to test the Config model
21
    from .models import Config
22
    Config.generate_example()
23
24
25 1
if __name__ == '__main__':
26
    main()
27