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.Truck.run()   A

Complexity

Conditions 1

Size

Total Lines 5
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
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