Completed
Push — init ( 57bb17 )
by Michael
06:45
created

tag()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1.037

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 1
c 3
b 0
f 0
dl 0
loc 5
ccs 2
cts 3
cp 0.6667
crap 1.037
rs 9.4285
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...
2
3
from . import __version__
4
from . import commands
5
6
7
VERSION = 'changes {}'.format(__version__)
8
9
10
def print_version(context, param, value):
11
    if not value or context.resilient_parsing:
12
        return
13
    click.echo(VERSION)
14
    context.exit()
15
16
17
@click.option(
18
    '--dry-run',
19
    help='Prints (instead of executing) the operations to be performed.',
20
    is_flag=True,
21
    default=False,
22
)
23
@click.option(
24
    '--verbose',
25
    help='Enables verbose output.',
26
    is_flag=True,
27
    default=False,
28
)
29
@click.version_option(
30
    __version__,
31
    '-V',
32
    '--version',
33
    message=VERSION
34
)
35
@click.group(
36
    context_settings=dict(
37
        help_option_names=[u'-h', u'--help']
38
    ),
39
)
40
@click.pass_context
41
def main(context, dry_run, verbose):
42
    """Ch-ch-changes"""
43
    pass
44
45
46
# main.add_command(help_command, name='help')
47
@click.command()
48
def init():
49
    """
50
    Detects, prompts and initialises the project.
51
    """
52
    commands.init()
53
54
main.add_command(init)
55
# main.add_command(status)
56
# main.add_command(stage)
57
# main.add_command(publish)
58
59
60