Test Failed
Pull Request — master (#50)
by
unknown
02:48
created

get_init_integer_values()   A

Complexity

Conditions 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 2
1
from django.conf import settings
0 ignored issues
show
Configuration introduced by
The import django.conf 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
4
def get_init_values() -> dict:
5
    """Gets a test dictionary containing a key
6
    for every language."""
7
8
    keys = {}
9
10
    for lang_code, lang_name in settings.LANGUAGES:
11
        keys[lang_code] = 'value in %s' % lang_name
12
13
    return keys
14
15
16
def get_init_integer_values () -> dict:
0 ignored issues
show
Coding Style introduced by
No space allowed before bracket
def get_init_integer_values () -> dict:
^
Loading history...
17
    """Gets a test dictionary containing a key
18
        for every language with value that can be parsed to int"""
19
20
    keys = {}
21
22
    for counter, (lang_code, lang_name) in enumerate(settings.LANGUAGES):
0 ignored issues
show
Unused Code introduced by
The variable lang_name seems to be unused.
Loading history...
23
        keys[lang_code] = counter
24
25
    return keys
26
27