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_pup_hub   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 33
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 7

6 Methods

Rating   Name   Duplication   Size   Complexity  
A Robot.tilt_sensor_change() 0 2 1
A Robot.vision_sensor_change() 0 2 1
A Robot.motor_r_change() 0 2 1
A Robot.run() 0 6 1
A Robot.motor_l_change() 0 2 1
A Robot.hub_btn_change() 0 2 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 PoweredUpHub
5
from bricknil.sensor import TrainMotor, VisionSensor, Button, LED, InternalTiltSensor, InternalMotor
6
from bricknil.process import Process
7
from bricknil.const import Color
8
import logging
9
10
@attach(Button, name='hub_btn', capabilities=['sense_press'])
11
@attach(LED, name='hub_led')
12
#@attach(VisionSensor, name='vision_sensor', capabilities=['sense_count', 'sense_distance'])
13
@attach(TrainMotor, name='motor_l')
14
class Robot(PoweredUpHub):
15
16
    async def hub_btn_change(self):
17
        pass
18
    async def vision_sensor_change(self):
19
        pass
20
    async def motor_l_change(self):
21
        pass
22
    async def motor_r_change(self):
23
        pass
24
    async def tilt_sensor_change(self):
25
        pass
26
27
    async def run(self):
28
        self.message_info("Running")
29
        await sleep(20) # Give it enough time to gather data
30
        self.message_info("Done")
31
32
        self.message_info(self.port_info)
33
34
async def system():
35
    hub = Robot('robot', query_port_info=True, ble_id='05c5e50e-71e9-4dcf-871a-7e5b93b36d6a')
36
37
if __name__ == '__main__':
38
    logging.basicConfig(level=logging.INFO)
39
    start(system)
40