One problem with coding is python is the lack of a compile stage to point out obvious things like typos in variable names. I'd like to be able to use pylint for help with this, but the list of complaints is too large to be readable. I think it would be nice if we (I) could do the initial work to get the code in line with python coding standards so that the pylint output is reasonable. This is the first stab at that.
The first patch adds a pylintrc configuration file and the second is just one in a series of many to come which whittles down the list of complaints by a few thousand lines. It's mostly aimed at the chirp module core, drivers, etc. It doesn't touch the UI and it doesn't touch the bitwise stuff.
I'd recommend you run pylint like this:
pylint --rcfile=pylintrc --ignore=tmv71.py,tmv71_ll.py,thd72.py,\ pyPEG.py,bitwise.py,bitwise_grammar.py,ft50.py
There are still loads of things to fix, but this patch makes a good first stab at it. I'm sending this to the list, not because I'm really expecting any review, but more for a heads-up and/or round of comments about the approach. I want to get this committed to the tree soon because it's likely to clas with any/all patches from other folks... :)
Here's the (horrific) diffstat:
chirp/alinco.py | 89 ++++++++++--------- chirp/bitwise.py | 9 + chirp/chirp_common.py | 214 ++++++++++++++++++++++++++++------------------ chirp/detect.py | 48 ++++------ chirp/directory.py | 51 ++++------- chirp/errors.py | 6 + chirp/ft2800.py | 34 +++---- chirp/ft60.py | 28 +++--- chirp/ft7800.py | 76 +++++++++------- chirp/ft817.py | 222 ++++++++++++++++++++++++++++-------------------- chirp/ft857.py | 85 +++++++++++------- chirp/generic_csv.py | 76 ++++++++-------- chirp/generic_tpe.py | 19 ++-- chirp/generic_xml.py | 29 ++---- chirp/ic2100.py | 151 ++++++++++++++++---------------- chirp/ic2200.py | 45 ++++----- chirp/ic2720.py | 7 - chirp/ic2820.py | 64 +++++++------ chirp/ic9x.py | 101 ++++++++------------- chirp/ic9x_icf.py | 4 chirp/ic9x_icf_ll.py | 29 ++++-- chirp/ic9x_ll.py | 152 +++++++++++++++----------------- chirp/icf.py | 147 +++++++++++++++++++------------ chirp/icomciv.py | 47 +++++++--- chirp/icq7.py | 8 - chirp/ict70.py | 9 + chirp/icw32.py | 32 +++--- chirp/icx8x.py | 21 ++-- chirp/id31.py | 61 ++++++------- chirp/id800.py | 89 +++++++++---------- chirp/id880.py | 81 +++++++++-------- chirp/idrp.py | 28 +++--- chirp/import_logic.py | 15 ++- chirp/kenwood_hmk.py | 3 chirp/kenwood_live.py | 167 ++++++++++++++++++++---------------- chirp/memmap.py | 5 + chirp/platform.py | 90 +++++++++---------- chirp/radioreference.py | 23 +++- chirp/rfinder.py | 108 +++++++++++++---------- chirp/settings.py | 47 ++++++++-- chirp/template.py | 13 +- chirp/util.py | 12 +- chirp/uv5r.py | 194 ++++++++++++++++++++--------------------- chirp/vx3.py | 35 ++++--- chirp/vx5.py | 7 - chirp/vx6.py | 58 ++++++------ chirp/vx7.py | 32 +++--- chirp/vx8.py | 19 ++-- chirp/vxa700.py | 85 +++++++++--------- chirp/wouxun.py | 151 ++++++++++++++++++-------------- chirp/xml_ll.py | 20 ++-- chirp/yaesu_clone.py | 73 ++++++--------- chirpui/clone.py | 2 chirpui/mainapp.py | 2 54 files changed, 1755 insertions(+), 1468 deletions(-)