mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-23 09:08:30 -04:00
Tools: update with flake8
W605 invalid escape sequence '\s' F402 import 'time' from line 10 shadowed by loop variable E101 indentation contains mixed spaces and tabs E703 statement ends with a semicolon
This commit is contained in:
parent
a966c75deb
commit
9850d1afec
@ -1019,7 +1019,7 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
|
|||||||
self.change_mode("RTL")
|
self.change_mode("RTL")
|
||||||
# location copied in from rover-test-rally.txt:
|
# location copied in from rover-test-rally.txt:
|
||||||
loc = mavutil.location(40.071553,
|
loc = mavutil.location(40.071553,
|
||||||
-105.229401,
|
-105.229401,
|
||||||
0,
|
0,
|
||||||
0)
|
0)
|
||||||
self.wait_location(loc, accuracy=accuracy)
|
self.wait_location(loc, accuracy=accuracy)
|
||||||
@ -1720,7 +1720,7 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
|
|||||||
lambda: self.drive_mission("rover1.txt")),
|
lambda: self.drive_mission("rover1.txt")),
|
||||||
|
|
||||||
# disabled due to frequent failures in travis. This test needs re-writing
|
# disabled due to frequent failures in travis. This test needs re-writing
|
||||||
# ("Drive Brake", self.drive_brake),
|
# ("Drive Brake", self.drive_brake),
|
||||||
|
|
||||||
("GetBanner", "Get Banner", self.do_get_banner),
|
("GetBanner", "Get Banner", self.do_get_banner),
|
||||||
|
|
||||||
@ -1812,7 +1812,7 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
|
|||||||
ret = super(AutoTestRover, self).rc_defaults()
|
ret = super(AutoTestRover, self).rc_defaults()
|
||||||
ret[3] = 1500
|
ret[3] = 1500
|
||||||
ret[8] = 1800
|
ret[8] = 1800
|
||||||
return ret;
|
return ret
|
||||||
|
|
||||||
def default_mode(self):
|
def default_mode(self):
|
||||||
return 'MANUAL'
|
return 'MANUAL'
|
||||||
|
@ -1782,7 +1782,7 @@ class AutoTestCopter(AutoTest):
|
|||||||
self.mavproxy.expect('BANG')
|
self.mavproxy.expect('BANG')
|
||||||
self.set_rc(9, 1000)
|
self.set_rc(9, 1000)
|
||||||
self.reboot_sitl()
|
self.reboot_sitl()
|
||||||
self.context_pop();
|
self.context_pop()
|
||||||
|
|
||||||
self.progress("Crashing with 3pos switch in disable position")
|
self.progress("Crashing with 3pos switch in disable position")
|
||||||
loiter_alt = 10
|
loiter_alt = 10
|
||||||
|
@ -589,13 +589,13 @@ class AutoTest(ABC):
|
|||||||
if l1 == l2:
|
if l1 == l2:
|
||||||
# e.g. the first "QGC WPL 110" line
|
# e.g. the first "QGC WPL 110" line
|
||||||
continue
|
continue
|
||||||
if re.match("0\s", l1):
|
if re.match(r"0\s", l1):
|
||||||
# home changes...
|
# home changes...
|
||||||
continue
|
continue
|
||||||
l1 = l1.rstrip()
|
l1 = l1.rstrip()
|
||||||
l2 = l2.rstrip()
|
l2 = l2.rstrip()
|
||||||
fields1 = re.split("\s+", l1)
|
fields1 = re.split(r"\s+", l1)
|
||||||
fields2 = re.split("\s+", l2)
|
fields2 = re.split(r"\s+", l2)
|
||||||
# line = int(fields1[0])
|
# line = int(fields1[0])
|
||||||
t = int(fields1[3]) # mission item type
|
t = int(fields1[3]) # mission item type
|
||||||
for (count, (i1, i2)) in enumerate(zip(fields1, fields2)):
|
for (count, (i1, i2)) in enumerate(zip(fields1, fields2)):
|
||||||
@ -1859,10 +1859,10 @@ class AutoTest(ABC):
|
|||||||
for desc in self.test_timings.keys():
|
for desc in self.test_timings.keys():
|
||||||
if len(desc) > longest:
|
if len(desc) > longest:
|
||||||
longest = len(desc)
|
longest = len(desc)
|
||||||
for desc, time in sorted(self.test_timings.iteritems(),
|
for desc, test_time in sorted(self.test_timings.iteritems(),
|
||||||
key=self.show_test_timings_key_sorter):
|
key=self.show_test_timings_key_sorter):
|
||||||
fmt = "%" + str(longest) + "s: %.2fs"
|
fmt = "%" + str(longest) + "s: %.2fs"
|
||||||
self.progress(fmt % (desc, time))
|
self.progress(fmt % (desc, test_time))
|
||||||
|
|
||||||
def send_statustext(self, text):
|
def send_statustext(self, text):
|
||||||
if sys.version_info.major >= 3 and not isinstance(text, bytes):
|
if sys.version_info.major >= 3 and not isinstance(text, bytes):
|
||||||
|
Loading…
Reference in New Issue
Block a user