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.

HaltMessage   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A create_message() 0 8 1
A send_message() 0 9 1
A __init__() 0 5 1
1
"""
2
Enarksh
3
4
Copyright 2013-2016 Set Based IT Consultancy
5
6
Licence MIT
7
"""
8
from enarksh.message.Message import Message
9
10
11
class HaltMessage(Message):
12
    """
13
    Message type for instructing a daemon of Enarksh to halt.
14
    """
15
    MESSAGE_TYPE = 'HaltMessage'
16
    """
17
    The message type.
18
19
    :type: str
20
    """
21
22
    # ------------------------------------------------------------------------------------------------------------------
23
    def __init__(self):
24
        """
25
        Object constructor.
26
        """
27
        Message.__init__(self, HaltMessage.MESSAGE_TYPE)
28
29
    # ------------------------------------------------------------------------------------------------------------------
30
    @staticmethod
31
    def create_message(_):
32
        """
33
        Create a message of this class based on JSON data.
34
35
        :rtype: enarksh.message.HaltMessage.HaltMessage
36
        """
37
        return HaltMessage()
38
39
    # ------------------------------------------------------------------------------------------------------------------
40
    def send_message(self, end_point):
41
        """
42
        Sends the message to an end point.
43
44
        :param str end_point: The end point.
45
46
        :rtype: None
47
        """
48
        self.message_controller.send_message(end_point, self)
49
50
# ----------------------------------------------------------------------------------------------------------------------
51