Passed
Push — master ( 694e2f...150a8e )
by Dean
09:10 queued 06:18
created

TraktAccountService   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
dl 0
loc 8
ccs 0
cts 4
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A delete() 0 5 1
1
from plugin.api.core.base import Service, expose
2
from plugin.managers.m_trakt.account import TraktAccountManager
0 ignored issues
show
Bug introduced by
The name account does not seem to exist in module plugin.managers.m_trakt.
Loading history...
Configuration introduced by
Unable to import 'plugin.managers.m_trakt.account' (invalid syntax (<string>, line 77))

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...
3
4
5
class TraktAccountService(Service):
6
    __key__ = 'account.trakt'
7
8
    @expose
9
    def delete(self, id):
0 ignored issues
show
Bug Best Practice introduced by
This seems to re-define the built-in id.

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

Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
10
        # Delete trakt account
11
        return TraktAccountManager.delete(
12
            id=id
13
        )
14