-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply some fixes for flake8 #672
Conversation
35a364d
to
5021ae7
Compare
@@ -395,7 +395,7 @@ def format_freq(self): | |||
def parse_freq(self, freqstr): | |||
"""Set the frequency from a string""" | |||
self.freq = parse_freq(freqstr) | |||
return self.freqx | |||
return self.freq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes! Not sure this ever got used, but better that it's right. Looks like an errant typo on my part :(
@@ -602,10 +602,6 @@ def set_settings(self, settings): | |||
def process_mmap(self): | |||
self.memobj = bitwise.parse(ICX90_MEM_FORMAT, self._mmap) | |||
|
|||
def get_raw_memory(self, number): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow, this one is interesting... Maybe a bad merge at some point.
This is a huge amount of work, thanks very much for doing this! I'm fine with what is here, but I want to check with @KC9HI about the |
Mainly copy-and-paste. Whoever developed the initial uv5r.py driver had a SETTING_LISTS thing and it just got migrated to other drivers. I don't remember if I ever asked what they were for. I just assumed it was a "CHIRP" thing. I don't use them for anything. If CHIRP doesn't need it, I don't need it and would be happy to stop adding/maintaining them. |
Okay, that might've been me, so I'll take the blame :) I'll rebase this and merge then, thanks for the confirmation! |
The function _() is installed in Python’s builtins namespace by chirp/wxui/__init__.py
Fixes: ./chirp/drivers/lt725uv.py:269:9: F821 undefined name 'Log' ./chirp/drivers/vgc.py:354:9: F821 undefined name 'Log' ./chirp/drivers/ap510.py:407:19: F821 undefined name 'file' ./chirp/drivers/btech.py:811:62: F821 undefined name 'value' ./chirp/drivers/ic2730.py:1309:29: F821 undefined name 'sstx' ./chirp/drivers/thd72.py:839:9: F821 undefined name 'file' ./chirp/drivers/thd72.py:841:19: F821 undefined name 'file' ./chirp/drivers/tk760.py:229:19: F821 undefined name 'hexprint' ./chirp/drivers/retevis_rt98.py:591:17: F821 undefined name 'radio'
Fixes: ./chirp/drivers/kguv920pa.py:39:13: W605 invalid escape sequence '\]' ./chirp/drivers/retevis_rt87.py:199:47: W605 invalid escape sequence '\]' ./chirp/drivers/vx3.py:941:34: W605 invalid escape sequence '\d' ./chirp/drivers/ft90.py:674:34: W605 invalid escape sequence '\d' ./chirp/drivers/vx2.py:715:34: W605 invalid escape sequence '\d' ./chirp/drivers/ft1d.py:586:33: W605 invalid escape sequence '\d' ./chirp/drivers/ft1d.py:586:39: W605 invalid escape sequence '\s' ./chirp/drivers/ft1d.py:586:52: W605 invalid escape sequence '\d' ./chirp/drivers/vgc.py:1429:40: W605 invalid escape sequence '\d' ./chirp/drivers/vx8.py:525:33: W605 invalid escape sequence '\d' ./chirp/drivers/vx8.py:525:39: W605 invalid escape sequence '\s' ./chirp/drivers/vx8.py:525:52: W605 invalid escape sequence '\d' ./chirp/drivers/tk760g.py:88:71: W605 invalid escape sequence '\F' ./chirp/drivers/tk760g.py:277:59: W605 invalid escape sequence '\-' ./chirp/drivers/ic9x.py:51:30: W605 invalid escape sequence '\]' ./chirp/drivers/vx6.py:874:44: W605 invalid escape sequence '\d' ./chirp/drivers/vx6.py:887:37: W605 invalid escape sequence '\d' ./chirp/drivers/ap510.py:330:11: W605 invalid escape sequence '\#' ./chirp/drivers/ft7800.py:746:34: W605 invalid escape sequence '\d' ./chirp/drivers/retevis_rt26.py:885:40: W605 invalid escape sequence '\d'
Removed with: autoflake --in-place --recursive --ignore-pass-after-docstring --remove-all-unused-imports . and non committing the removal of "pass" statements.
Fixes: F841 local variable 'e' is assigned to but never used
Fixes: ./chirp/drivers/retevis_rt98.py:25:1: F811 redefinition of unused 'RadioSettingValueString' from line 25 ./chirp/drivers/th9000.py:25:1: F811 redefinition of unused 'RadioSettingValueString' from line 25 ./chirp/drivers/icf.py:25:1: F811 redefinition of unused 'struct' from line 21 ./chirp/drivers/icf.py:31:1: F811 redefinition of unused 'util' from line 27
Fixes: ./chirp/drivers/icx90.py:670:5: F811 redefinition of unused 'get_raw_memory' from line 605 ./chirp/drivers/ft1d.py:2528:5: F811 redefinition of unused 'apply_WEhemi' from line 2521
For consistency with the set_settings() method in other drivers
Fixes: chirp/drivers/generic_csv.py:199:12: W0612: Unused variable 'header' (unused-variable)
This was probably lost in a rebase.
This PR
SETTINGS_LISTS
and thee
inexcept Exception as e:
)and makes 16 files "clean".