scripts: runners: clean up super() calls

We can just call super() instead of super(MyClassName, self). The
original extra verbosity is likely due to old habits of mine from
Python 2 which are no longer necessary, but got copy/pasted around.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2020-06-23 13:27:11 -07:00 committed by Carles Cufí
commit 7b93bd54d4
16 changed files with 16 additions and 16 deletions

View file

@ -13,7 +13,7 @@ class BlackMagicProbeRunner(ZephyrBinaryRunner):
'''Runner front-end for Black Magic probe.'''
def __init__(self, cfg, gdb_serial):
super(BlackMagicProbeRunner, self).__init__(cfg)
super().__init__(cfg)
self.gdb = [cfg.gdb] if cfg.gdb else None
self.elf_file = cfg.elf_file
self.gdb_serial = gdb_serial

View file

@ -16,7 +16,7 @@ class BossacBinaryRunner(ZephyrBinaryRunner):
def __init__(self, cfg, bossac='bossac', port=DEFAULT_BOSSAC_PORT,
offset=None):
super(BossacBinaryRunner, self).__init__(cfg)
super().__init__(cfg)
self.bossac = bossac
self.port = port
self.offset = offset

View file

@ -47,7 +47,7 @@ class CANopenBinaryRunner(ZephyrBinaryRunner):
"see the getting started guide for details on "
"how to fix")
super(CANopenBinaryRunner, self).__init__(cfg)
super().__init__(cfg)
self.bin_file = cfg.bin_file
self.confirm = confirm
self.confirm_only = confirm_only

View file

@ -17,7 +17,7 @@ class DediProgBinaryRunner(ZephyrBinaryRunner):
'''Runner front-end for DediProg (dpcmd).'''
def __init__(self, cfg, spi_image, vcc, retries):
super(DediProgBinaryRunner, self).__init__(cfg)
super().__init__(cfg)
self.spi_image = spi_image
self.vcc = vcc
self.dpcmd_retries = retries

View file

@ -20,7 +20,7 @@ class DfuUtilBinaryRunner(ZephyrBinaryRunner):
def __init__(self, cfg, pid, alt, img, exe='dfu-util',
dfuse_config=None):
super(DfuUtilBinaryRunner, self).__init__(cfg)
super().__init__(cfg)
self.alt = alt
self.img = img
self.cmd = [exe, '-d,{}'.format(pid)]

View file

@ -17,7 +17,7 @@ class Esp32BinaryRunner(ZephyrBinaryRunner):
def __init__(self, cfg, device, baud=921600, flash_size='detect',
flash_freq='40m', flash_mode='dio', espidf='espidf',
bootloader_bin=None, partition_table_bin=None):
super(Esp32BinaryRunner, self).__init__(cfg)
super().__init__(cfg)
self.elf = cfg.elf_file
self.device = device
self.baud = baud

View file

@ -13,7 +13,7 @@ class HiFive1BinaryRunner(ZephyrBinaryRunner):
'''Runner front-end for the HiFive1 board, using openocd.'''
def __init__(self, cfg):
super(HiFive1BinaryRunner, self).__init__(cfg)
super().__init__(cfg)
self.openocd_config = path.join(cfg.board_dir, 'support', 'openocd.cfg')
@classmethod

View file

@ -19,7 +19,7 @@ class IntelS1000BinaryRunner(ZephyrBinaryRunner):
def __init__(self, cfg, xt_ocd_dir,
ocd_topology, ocd_jtag_instr, gdb_flash_file,
gdb_port=DEFAULT_XT_GDB_PORT):
super(IntelS1000BinaryRunner, self).__init__(cfg)
super().__init__(cfg)
self.board_dir = cfg.board_dir
self.elf_name = cfg.elf_file
self.gdb_cmd = cfg.gdb

View file

@ -30,7 +30,7 @@ class JLinkBinaryRunner(ZephyrBinaryRunner):
iface='swd', speed='auto',
gdbserver='JLinkGDBServer', gdb_port=DEFAULT_JLINK_GDB_PORT,
tui=False, tool_opt=[]):
super(JLinkBinaryRunner, self).__init__(cfg)
super().__init__(cfg)
self.bin_name = cfg.bin_file
self.elf_name = cfg.elf_file
self.gdb_cmd = [cfg.gdb] if cfg.gdb else None

View file

@ -15,7 +15,7 @@ class MdbBinaryRunner(ZephyrBinaryRunner):
def __init__(self, cfg, cores=1, jtag='digilent', nsim_args='',
dig_device=''):
super(MdbBinaryRunner, self).__init__(cfg)
super().__init__(cfg)
self.jtag = jtag
self.cores = int(cores)
if nsim_args != '':

View file

@ -19,7 +19,7 @@ class Nios2BinaryRunner(ZephyrBinaryRunner):
# and CONFIG_INCLUDE_RESET_VECTOR must be disabled."
def __init__(self, cfg, quartus_py=None, cpu_sof=None, tui=False):
super(Nios2BinaryRunner, self).__init__(cfg)
super().__init__(cfg)
self.hex_name = cfg.hex_file
self.elf_name = cfg.elf_file
self.cpu_sof = cpu_sof

View file

@ -17,7 +17,7 @@ class NrfJprogBinaryRunner(ZephyrBinaryRunner):
def __init__(self, cfg, family, softreset, snr, erase=False,
tool_opt=[]):
super(NrfJprogBinaryRunner, self).__init__(cfg)
super().__init__(cfg)
self.hex_ = cfg.hex_file
self.family = family
self.softreset = softreset

View file

@ -27,7 +27,7 @@ class NsimBinaryRunner(ZephyrBinaryRunner):
tui=False,
gdb_port=DEFAULT_ARC_GDB_PORT,
props=DEFAULT_PROPS_FILE):
super(NsimBinaryRunner, self).__init__(cfg)
super().__init__(cfg)
self.gdb_cmd = [cfg.gdb] + (['-tui'] if tui else [])
self.nsim_cmd = ['nsimdrv']
self.gdb_port = gdb_port

View file

@ -27,7 +27,7 @@ class OpenOcdBinaryRunner(ZephyrBinaryRunner):
tcl_port=DEFAULT_OPENOCD_TCL_PORT,
telnet_port=DEFAULT_OPENOCD_TELNET_PORT,
gdb_port=DEFAULT_OPENOCD_GDB_PORT):
super(OpenOcdBinaryRunner, self).__init__(cfg)
super().__init__(cfg)
if not config:
default = path.join(cfg.board_dir, 'support', 'openocd.cfg')

View file

@ -22,7 +22,7 @@ class PyOcdBinaryRunner(ZephyrBinaryRunner):
gdb_port=DEFAULT_PYOCD_GDB_PORT,
telnet_port=DEFAULT_PYOCD_TELNET_PORT, tui=False,
board_id=None, daparg=None, frequency=None, tool_opt=None):
super(PyOcdBinaryRunner, self).__init__(cfg)
super().__init__(cfg)
self.target_args = ['-t', target]
self.pyocd = pyocd

View file

@ -19,7 +19,7 @@ class Stm32flashBinaryRunner(ZephyrBinaryRunner):
def __init__(self, cfg, device, action='write', baud=57600,
force_binary=False, start_addr=0, exec_addr=None,
serial_mode='8e1', reset=False, verify=False):
super(Stm32flashBinaryRunner, self).__init__(cfg)
super().__init__(cfg)
self.device = device
self.action = action