GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 7603ec...aaf73b )
by Raphaël
01:48
created

Reference   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 80%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A return_class() 0 3 1
A name() 0 3 1
A __init__() 0 11 2
1 1
from pyjection.helper import get_service_subject_identifier
2
3
4 1
class Reference(object):
5
    """
6
    Base class used when a service needs to register a dependency to another service
7
    """
8
9 1
    def __init__(self, name, return_class=False):
10
        """
11
        :param name: Name of the reference
12
        :type name: str
13
        :param return_class: Whether the reference is on an instance of the other service or a class
14
        :type return_class: bool
15
        """
16 1
        self._name = name
17 1
        if isinstance(name, str) is False:
18
            self._name = get_service_subject_identifier(name)
19 1
        self._return_class = return_class
20
21 1
    @property
22
    def name(self):
23 1
        return self._name
24
25 1
    @property
26
    def return_class(self):
27
        return self._return_class
28