Skip to content

Commit

Permalink
Fred/cleanup (#27)
Browse files Browse the repository at this point in the history
* Cleanup to make pylint happy
* update requirements and remove python 3.8 from workflow
  • Loading branch information
0x9900 authored Nov 21, 2024
1 parent 8d25c93 commit f297118
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 0 additions & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
flake8
isort
pre-commit
pylint
pyserial
setuptools
pre-commit
6 changes: 2 additions & 4 deletions sa818.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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,too-many-positional-arguments
tone = ctcss if ctcss else dcs
if tone: # 0000 = No ctcss or dcs tone
tx_tone, rx_tone = tone
Expand Down

0 comments on commit f297118

Please sign in to comment.