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.
Test Setup Failed
Push — master ( b8ae6a...dff9b6 )
by Benjamin
01:15
created

Node.__set_led()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 2
rs 10
1
from bin.button import Button
2
from bin.led import Led
3
from bin.timer import Timer
4
5
6
class Node(object):
7
    def __init__(self, bus, button_address, button_port, led_address, led_port):
8
        self.__bus = bus
9
        self.__button = self.__set_button(button_address, button_port)
10
        self.__led = self.__set_led(led_address, led_port)
11
        self.__timer = Timer()
12
        self.active = False
13
14
    def __set_button(self, button_address, button_port):
15
        return Button(self.__bus, button_address, button_port)
16
17
    def __set_led(self, led_address, led_port):
18
        return Led(self.__bus, led_address, led_port)
19
20
    def activate(self):
21
        self.active = True
22
23
        self.__timer.start()
24
        self.__led.activate()
25
26
    def deactivate(self):
27
        self.active = False
28
        self.__led.deactivate()
29
30
        total_time = self.__timer.stop()
31
        return total_time
32