Test Failed
Push — master ( 2df2ec...bb84d7 )
by Swen
01:55
created

LocalizedModel.check()   A

Complexity

Conditions 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1.4218

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 11
ccs 1
cts 4
cp 0.25
crap 1.4218
rs 9.4285
1 1
from psqlextra.models import PostgresModel
0 ignored issues
show
Configuration introduced by
The import psqlextra.models 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 1
3
from .mixins import AtomicSlugRetryMixin
4
5 1
6
class LocalizedModel(AtomicSlugRetryMixin, PostgresModel):
7
    """Turns a model into a model that contains LocalizedField's.
8 1
9
    For basic localisation functionality, it isn't needed to inherit
10
    from LocalizedModel. However, for certain features, this is required.
11
12
    It is definitely needed for :see:LocalizedUniqueSlugField, unless you
13
    manually inherit from AtomicSlugRetryMixin."""
14
15
    class Meta:
16
        abstract = True
17