diff --git a/dist/pythonlibs/testrunner/spawn.py b/dist/pythonlibs/testrunner/spawn.py index 8b6c05144c..60d06187d7 100644 --- a/dist/pythonlibs/testrunner/spawn.py +++ b/dist/pythonlibs/testrunner/spawn.py @@ -56,8 +56,8 @@ def _reset_board(env): pass -def list_until(l, cond): - return l[:([i for i, e in enumerate(l) if cond(e)][0])] +def list_until(list_, cond): + return list_[:([i for i, e in enumerate(list_) if cond(e)][0])] def find_exc_origin(exc_info): diff --git a/dist/tools/bmp/bmp.py b/dist/tools/bmp/bmp.py index 0a97b86711..83eac8acf3 100755 --- a/dist/tools/bmp/bmp.py +++ b/dist/tools/bmp/bmp.py @@ -72,11 +72,11 @@ def detect_probes(): return gdb_ports, uart_ports -# search device with specific serial number in list -def search_serial(snr, l): - for p in l: - if snr in p.serial_number: - return p.device +# search device with specific serial number in a list of ports +def search_serial(snr, ports): + for port in ports: + if snr in port.serial_number: + return port.device # parse GDB output for targets diff --git a/tests/pbkdf2/tests/test_base.py b/tests/pbkdf2/tests/test_base.py index c6a639929e..b7ceced0f4 100644 --- a/tests/pbkdf2/tests/test_base.py +++ b/tests/pbkdf2/tests/test_base.py @@ -25,10 +25,10 @@ def test(vectors, child): assert idx == 0 return idx - def _safe_sendline(l): - assert len(l) < MAX_LINE + def _safe_sendline(line): + assert len(line) < MAX_LINE _safe_expect_exact('{ready}') - child.sendline(l) + child.sendline(line) for passwd, salt, iters, key in vectors: _safe_sendline(passwd)