From f9c3e40fd566f3bc23a3ea78924c3076576bc8ab Mon Sep 17 00:00:00 2001 From: Fred C Date: Tue, 19 Nov 2024 18:35:13 -0800 Subject: [PATCH 1/3] Cleanup to make pylint happy --- pylintrc | 1 - sa818.py | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pylintrc b/pylintrc index 26f638d..e7dbb4c 100644 --- a/pylintrc +++ b/pylintrc @@ -155,7 +155,6 @@ disable=raw-checker-failed, missing-function-docstring, missing-class-docstring, missing-module-docstring, - too-many-positional-arguments # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option diff --git a/sa818.py b/sa818.py index 0d4cc36..4a2a57b 100755 --- a/sa818.py +++ b/sa818.py @@ -78,10 +78,7 @@ def __init__(self, port=None, baud=DEFAULT_BAUDRATE): # Send initialization command and check the reply self.send(self.INIT) reply = self.readline() - if reply == "+DMOCONNECT:0": - # if expected response, proceed - break - else: + if reply != "+DMOCONNECT:0": # if unexpected response, try another port logger.debug("Port %s not SA818: %s", _port, reply) self.serial.close() @@ -133,6 +130,7 @@ def version(self): return version def set_radio(self, frequency, offset, bw, squelch, ctcss, dcs, tail): + # pylint: disable=too-many-locals tone = ctcss if ctcss else dcs if tone: # 0000 = No ctcss or dcs tone tx_tone, rx_tone = tone From 7f90975bd0318120237b8eecbac31ee6c0b297a4 Mon Sep 17 00:00:00 2001 From: Fred C Date: Tue, 19 Nov 2024 19:14:04 -0800 Subject: [PATCH 2/3] Pylint complaining --- sa818.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sa818.py b/sa818.py index 4a2a57b..5bd555d 100755 --- a/sa818.py +++ b/sa818.py @@ -130,7 +130,7 @@ def version(self): return version def set_radio(self, frequency, offset, bw, squelch, ctcss, dcs, tail): - # pylint: disable=too-many-locals + # pylint: disable=too-many-locals,too-many-positional-arguments tone = ctcss if ctcss else dcs if tone: # 0000 = No ctcss or dcs tone tx_tone, rx_tone = tone From 608890c131a4901ca3cd4351126a06886065e7e5 Mon Sep 17 00:00:00 2001 From: Fred C Date: Wed, 20 Nov 2024 16:35:47 -0800 Subject: [PATCH 3/3] update requirements and remove python 3.8 from workflow --- .github/workflows/main.yaml | 2 +- requirements.txt | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index dc10a17..0d25e46 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/requirements.txt b/requirements.txt index 2df1f11..6b58708 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,6 @@ +flake8 +isort +pre-commit +pylint pyserial setuptools -pre-commit