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

Complexity

Total Complexity 5

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 27
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 5

4 Methods

Rating   Name   Duplication   Size   Complexity  
A Remote.btn_l_change() 0 2 1
A Remote.run() 0 3 1
A Remote.hub_btn_change() 0 2 1
A Remote.btn_r_change() 0 2 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A system() 0 2 1
1
import logging
2
from itertools import cycle
3
from curio import sleep
4
from bricknil import attach, start
5
from bricknil.hub import PoweredUpRemote
6
from bricknil.sensor import TrainMotor, VisionSensor, Button, LED, InternalTiltSensor, InternalMotor, RemoteButtons
7
from bricknil.process import Process
8
from bricknil.const import Color
9
10
@attach(Button, name='hub_btn', capabilities=['sense_press'])
11
@attach(RemoteButtons, name='btn_r', capabilities=['sense_press'])
12
@attach(RemoteButtons, name='btn_l', capabilities=['sense_press'])
13
class Remote(PoweredUpRemote):
14
15
    async def hub_btn_change(self):
16
        self.message_info(f'Hub Btn change {self.hub_btn.value}')
17
    async def btn_r_change(self):
18
        self.message_info(f'Btn r change {self.btn_r.value}')
19
    async def btn_l_change(self):
20
        self.message_info(f'Btn l change {self.btn_l.value}')
21
22
    async def run(self):
23
        self.message_info("Running")
24
        await sleep(20) # Give it enough time to gather data
25
26
async def system():
27
    remote = Remote('remote', True)
28
29
if __name__ == '__main__':
30
    logging.basicConfig(level=logging.INFO)
31
    start(system)
32