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.
Passed
Push — master ( 5013b4...29c740 )
by Virantha
02:30 queued 11s
created

technic_4x4   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 19
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A Truck.run() 0 5 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A system() 0 2 1
1
#!/usr/bin/env python3
2
3
import logging
4
from curio import sleep
5
from bricknil import attach, start
6
from bricknil.hub import CPlusHub
7
from bricknil.sensor.motor import CPlusXLMotor
8
9
10
@attach(CPlusXLMotor, name='front_drive', port=0)
11
@attach(CPlusXLMotor, name='rear_drive', port=1)
12
class Truck(CPlusHub):
13
14
    async def run(self):
15
        self.message_info("Running")
16
        await self.front_drive.set_speed(-100)
17
        await self.rear_drive.set_speed(-100)
18
        await sleep(20) # Give it enough time to gather data
19
20
async def system():
21
    hub = Truck('truck', True)
22
23
if __name__ == '__main__':
24
    logging.basicConfig(level=logging.DEBUG)
25
    start(system)
26