Completed
Pull Request — develop (#5)
by Jace
02:26
created

main()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 1
b 0
f 0
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 1
from .models import Project, Config, Data
7
8
9 1
log = logging.getLogger(__name__)
10
11
12 1
@click.group()
13 1
@click.version_option(message=VERSION)
14
def main():
15 1
    logging.basicConfig(level=logging.INFO)
16 1
    logging.getLogger('yorm').setLevel(logging.WARNING)
17
18
19 1
@main.command()
20
def new():
21 1
    Project.generate()
22 1
    Config.generate_example()
23 1
    Data.generate_example()
24
25
26 1
if __name__ == '__main__':
27
    main()
28