From 435c6fc816e3bcb313b3034d3e1643fff2138a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Michalak-Szmaci=C5=84ski?= Date: Tue, 28 Feb 2023 16:39:11 +0100 Subject: [PATCH] Add to flake8 in workflow and fix python files (#25283) --- .flake8 | 2 -- scripts/build/builders/efr32.py | 9 +++++---- .../efr32/py/nl_test_runner/nl_test_runner.py | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.flake8 b/.flake8 index 20cfee8ad836b1..1bdb5a695d3159 100644 --- a/.flake8 +++ b/.flake8 @@ -12,7 +12,6 @@ exclude = third_party src/test_driver/mbed/* src/test_driver/linux-cirque/* src/test_driver/esp32/* - src/test_driver/efr32/* build/chip/java/tests/* build/chip/linux/* build/config/linux/* @@ -28,7 +27,6 @@ exclude = third_party scripts/build/builders/android.py scripts/build/builders/bouffalolab.py scripts/build/builders/cc13x2x7_26x2x7.py - scripts/build/builders/efr32.py scripts/build/builders/esp32.py scripts/build/builders/genio.py scripts/build/builders/gn.py diff --git a/scripts/build/builders/efr32.py b/scripts/build/builders/efr32.py index 5cf7ca2f93d22f..f4aa05fc762842 100644 --- a/scripts/build/builders/efr32.py +++ b/scripts/build/builders/efr32.py @@ -167,16 +167,16 @@ def __init__(self, if chip_build_libshell: self.extra_gn_options.append('chip_build_libshell=true') - if chip_logging == False: + if chip_logging is False: self.extra_gn_options.append('chip_logging=false') - if chip_openthread_ftd == False: + if chip_openthread_ftd is False: self.extra_gn_options.append('chip_openthread_ftd=false') if enable_heap_monitoring: self.extra_gn_options.append('enable_heap_monitoring=true') - if enable_openthread_cli == False: + if enable_openthread_cli is False: self.extra_gn_options.append('enable_openthread_cli=false') if show_qr_code: @@ -208,7 +208,8 @@ def __init__(self, if enable_ot_coap_lib: self.extra_gn_options.append( - 'use_silabs_thread_lib=true chip_openthread_target="../silabs:ot-efr32-cert" use_thread_coap_lib=true openthread_external_platform=""') + 'use_silabs_thread_lib=true chip_openthread_target="../silabs:ot-efr32-cert" ' + 'use_thread_coap_lib=true openthread_external_platform=""') if not no_version: shortCommitSha = subprocess.check_output( diff --git a/src/test_driver/efr32/py/nl_test_runner/nl_test_runner.py b/src/test_driver/efr32/py/nl_test_runner/nl_test_runner.py index 01c124bb6bf2d9..b4f096afed100d 100644 --- a/src/test_driver/efr32/py/nl_test_runner/nl_test_runner.py +++ b/src/test_driver/efr32/py/nl_test_runner/nl_test_runner.py @@ -90,7 +90,7 @@ def read(): return serial_device.read(8192) def runner(client) -> int: """ Run the tests""" def on_error_callback(call_object, error): - raise Exception("Error running test RPC: {}".format(status)) + raise Exception("Error running test RPC: {}".format(error)) rpc = client.client.channel(1).rpcs.chip.rpc.NlTest.Run invoke = rpc.invoke(rpc.request(), on_error=on_error_callback)