Passed
Push — master ( 8b08e5...a9037b )
by Swen
02:03
created

AtomicSlugRetryMixin.check()   A

Complexity

Conditions 1

Size

Total Lines 12

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 12
ccs 1
cts 4
cp 0.25
crap 1.4218
rs 9.4285
1 1
from django.core.checks import Warning
0 ignored issues
show
Bug Best Practice introduced by
This seems to re-define the built-in Warning.

It is generally discouraged to redefine built-ins as this makes code very hard to read.

Loading history...
Configuration introduced by
The import django.core.checks 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 1
class AtomicSlugRetryMixin:
4
    """A Mixin keeped for backwards compatibility"""
5
6 1
    @classmethod
7
    def check(cls, **kwargs):
8
        errors = super().check(**kwargs)
9
        errors.append(
10
            Warning(
11
                'localized_fields.AtomicSlugRetryMixin is deprecated',
12
                hint='There is no need to use '
13
                     'localized_fields.AtomicSlugRetryMixin',
14
                obj=cls
15
            )
16
        )
17
        return errors
18