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.

Message.send_message()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 10
ccs 0
cts 1
cp 0
crap 2
rs 9.4285
1
"""
2
Enarksh
3
4
Copyright 2013-2016 Set Based IT Consultancy
5
6
Licence MIT
7
"""
8
import abc
9
10
11
class Message(metaclass=abc.ABCMeta):
12
    """
13
    Class for messages exchanged between the processes of Enarksh.
14
    """
15
16
    # ------------------------------------------------------------------------------------------------------------------
17
    message_controller = None
18
    """
19
    The message controller.
20
21
    :type: None|enarksh.message.MessageController.MessageController
22
    """
23
24
    # ------------------------------------------------------------------------------------------------------------------
25
    def __init__(self, message_type):
26
        """
27
        Object constructor.
28
        """
29
        self._message_type = message_type
30
        """
31
        The type of the message.
32
33
        :type: str
34
        """
35
36
        self.message_source = None
37
        """
38
        For incoming messages the name of the source of the message. This field will be set by the message controller.
39
40
        :type: str
41
        """
42
43
    # ------------------------------------------------------------------------------------------------------------------
44
    @property
45
    def message_type(self):
46
        """
47
        Returns the message type of this message.
48
49
        :rtype: str
50
        """
51
        return self._message_type
52
53
    # ------------------------------------------------------------------------------------------------------------------
54
    @abc.abstractmethod
55
    def send_message(self, end_point):
56
        """
57
        Sends the message to an end point.
58
59
        :param str end_point: The end point.
60
61
        :rtype: None|enarksh.message.Message.Message
62
        """
63
        raise NotImplementedError()
64
65
# ----------------------------------------------------------------------------------------------------------------------
66