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

AtomicSlugRetryMixin   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 40%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 15
ccs 2
cts 5
cp 0.4
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A check() 0 12 1
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