diff --git a/.pylintrc b/.pylintrc index 7b295c6..fb20869 100644 --- a/.pylintrc +++ b/.pylintrc @@ -7,7 +7,7 @@ # Add files or directories matching the regex patterns to the blacklist. The # regex matches against base names, not paths. -ignore-patterns=mqtt_pb2.py,channel_pb2.py,environmental_measurement_pb2.py,admin_pb2.py,radioconfig_pb2.py,deviceonly_pb2.py,apponly_pb2.py,remote_hardware_pb2.py,portnums_pb2.py,mesh_pb2.py +ignore-patterns=mqtt_pb2.py,channel_pb2.py,environmental_measurement_pb2.py,admin_pb2.py,radioconfig_pb2.py,deviceonly_pb2.py,apponly_pb2.py,remote_hardware_pb2.py,portnums_pb2.py,mesh_pb2.py,storeforward_pb2.py diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index 9d965ca..d0a25f2 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -438,7 +438,7 @@ def onConnected(interface): enable = args.ch_enable # should we enable this channel? - if or args.ch_longslow or args.ch_longsfast or args.ch_mediumslow or args.ch_mediumsfast or args.ch_shortslow or args.ch_shortfast: + if args.ch_longslow or args.ch_longsfast or args.ch_mediumslow or args.ch_mediumsfast or args.ch_shortslow or args.ch_shortfast: if channelIndex != 0: raise Exception( "standard channel settings can only be applied to the PRIMARY channel") diff --git a/meshtastic/test/test_int.py b/meshtastic/test/test_int.py index ed359d4..4f89746 100644 --- a/meshtastic/test/test_int.py +++ b/meshtastic/test/test_int.py @@ -1,7 +1,6 @@ """Meshtastic integration tests""" import re import subprocess -import platform import pytest diff --git a/meshtastic/test/test_smoke1.py b/meshtastic/test/test_smoke1.py index 0bceb89..9041be5 100644 --- a/meshtastic/test/test_smoke1.py +++ b/meshtastic/test/test_smoke1.py @@ -1,7 +1,6 @@ """Meshtastic smoke tests with a single device""" import re import subprocess -import platform import time import os @@ -18,7 +17,7 @@ PAUSE_AFTER_COMMAND = 2 @pytest.mark.smoke1 def test_smoke1_reboot(): """Test reboot""" - return_value, out = subprocess.getstatusoutput('meshtastic --reboot') + return_value, _ = subprocess.getstatusoutput('meshtastic --reboot') assert return_value == 0 # pause for the radio to reset (10 seconds for the pause, and a few more seconds to be back up) time.sleep(18) @@ -54,7 +53,7 @@ def test_smoke1_seriallog_to_file(): filename = 'tmpoutput.txt' if os.path.exists(f"{filename}"): os.remove(f"{filename}") - return_value, out = subprocess.getstatusoutput(f'meshtastic --info --seriallog {filename}') + return_value, _ = subprocess.getstatusoutput(f'meshtastic --info --seriallog {filename}') assert os.path.exists(f"{filename}") assert return_value == 0 os.remove(f"{filename}") @@ -66,7 +65,7 @@ def test_smoke1_qr(): filename = 'tmpqr' if os.path.exists(f"{filename}"): os.remove(f"{filename}") - return_value, out = subprocess.getstatusoutput(f'meshtastic --qr > {filename}') + return_value, _ = subprocess.getstatusoutput(f'meshtastic --qr > {filename}') assert os.path.exists(f"{filename}") # not really testing that a valid qr code is created, just that the file size # is reasonably big enough for a qr code @@ -319,7 +318,7 @@ def test_smoke1_seturl_invalid_url(): """Test --seturl with invalid url""" # Note: This url is no longer a valid url. url = "https://www.meshtastic.org/c/#GAMiENTxuzogKQdZ8Lz_q89Oab8qB0RlZmF1bHQ=" - return_value, out = subprocess.getstatusoutput(f"meshtastic --seturl {url}") + _, out = subprocess.getstatusoutput(f"meshtastic --seturl {url}") assert re.match(r'Connected to radio', out) assert re.search('Aborting', out, re.MULTILINE) @@ -327,7 +326,7 @@ def test_smoke1_seturl_invalid_url(): @pytest.mark.smoke1 def test_smoke1_configure(): """Test --configure""" - return_value, out = subprocess.getstatusoutput(f"meshtastic --configure example_config.yaml") + _ , out = subprocess.getstatusoutput(f"meshtastic --configure example_config.yaml") assert re.match(r'Connected to radio', out) assert re.search('^Setting device owner to Bob TBeam', out, re.MULTILINE) assert re.search('^Fixing altitude at 304 meters', out, re.MULTILINE) diff --git a/meshtastic/test/test_util.py b/meshtastic/test/test_util.py index 68206ee..cd4f1ac 100644 --- a/meshtastic/test/test_util.py +++ b/meshtastic/test/test_util.py @@ -1,7 +1,4 @@ """Meshtastic unit tests for node.py""" -import re -import subprocess -import platform import pytest