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.

list_ports_duplo_hub   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 29
dl 0
loc 35
rs 10
c 0
b 0
f 0
wmc 6

5 Methods

Rating   Name   Duplication   Size   Complexity  
A Robot.tilt_sensor_change() 0 2 1
A Robot.motor_change() 0 2 1
A Robot.hub_btn_change() 0 2 1
A Robot.vision_sensor_change() 0 2 1
A Robot.run() 0 6 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A system() 0 2 1
1
from itertools import cycle
2
from curio import sleep
3
from bricknil import attach, start
4
from bricknil.hub import DuploTrainHub
5
from bricknil.sensor import DuploTrainMotor
6
from bricknil.process import Process
7
from bricknil.const import Color
8
import logging
9
10
@attach(DuploTrainMotor, name='motor')
11
class Robot(DuploTrainHub):
12
13
    async def hub_btn_change(self):
14
        pass
15
    async def vision_sensor_change(self):
16
        pass
17
    async def motor_change(self):
18
        pass
19
    async def tilt_sensor_change(self):
20
        pass
21
22
    async def run(self):
23
        self.message_info("Running")
24
        await sleep(20) # Give it enough time to gather data
25
        self.message_info("Done")
26
27
        self.message_info(self.port_info)
28
29
async def system():
30
    hub = Robot('robot', query_port_info=True)
31
32
if __name__ == '__main__':
33
    logging.basicConfig(level=logging.DEBUG)
34
    start(system)
35