Tools: make and declare examples.py flake8-compliant

This commit is contained in:
Peter Barker 2021-04-01 10:55:04 +11:00 committed by Peter Barker
parent 79d34b3b64
commit ee79895a4e

View File

@ -1,5 +1,14 @@
#!/usr/bin/env python
"""
Contains functions used to test the ArduPilot examples
AP_FLAKE8_CLEAN
"""
from __future__ import print_function from __future__ import print_function
import os import os
import pexpect import pexpect
import signal import signal
@ -8,6 +17,7 @@ import time
from pysim import util from pysim import util
def run_example(filepath, valgrind=False, gdb=False): def run_example(filepath, valgrind=False, gdb=False):
cmd = [] cmd = []
if valgrind: if valgrind:
@ -41,6 +51,7 @@ def run_example(filepath, valgrind=False, gdb=False):
print("Ran: (%s)" % str(cmd)) print("Ran: (%s)" % str(cmd))
def run_examples(debug=False, valgrind=False, gdb=False): def run_examples(debug=False, valgrind=False, gdb=False):
dirpath = util.reltopdir(os.path.join('build', 'linux', 'examples')) dirpath = util.reltopdir(os.path.join('build', 'linux', 'examples'))