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

index_repository()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 2
rs 10
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 ..models import GitRepository
4
5
# def bumpversion_init():
6
# def towncrier_init():
7
8
9
def index_repository():
10
    return GitRepository()
11
12
13
def info(message):
14
    click.echo(click.style(
15
        message,
16
        fg='green',
17
        bold=True
18
    ))
19
20
21
def init():
22
    """
23
    Detects, prompts and initialises the project.
24
    """
25
    info('Indexing repository...')
26
    repository = index_repository()
27
    click.echo(repository.owner)
28
    return repository
29
30