Passed
Push — master ( d09d11...4c06de )
by
unknown
01:59
created

setup()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
c 2
b 0
f 0
dl 0
loc 3
rs 10
1
#!/usr/bin/env python3
0 ignored issues
show
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
2
3
import click
0 ignored issues
show
Unused Code introduced by
The import click seems to be unused.
Loading history...
4
import connexion
0 ignored issues
show
Unused Code introduced by
The import connexion seems to be unused.
Loading history...
5
from flask import Flask
6
7
annif = Flask(__name__)
0 ignored issues
show
Coding Style Naming introduced by
The name annif does not conform to the constant naming conventions ((([A-Z_][A-Z0-9_]*)|(__.*__))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
8
9
#annif.config.from_object('config.DevelopmentConfig')
10
11
@annif.cli.command()
12
def setup():
0 ignored issues
show
Coding Style introduced by
This function should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
13
    return 'Setting up ElasticSearch'
14
15
@annif.route('/')
16
def start():
0 ignored issues
show
Coding Style introduced by
This function should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
17
    return 'Started application'
18
19
if __name__ == "__main__":
20
    annif.run(port=8000)
21