The logging module now handles the magical "debug.log" file, and the version string is emitted with LOG.debug.
The regresions caused by the patch that replaced CHIRP_DEBUG checks with proper logging calls was due to uncaught AttributeErrors (exposed as side-effects of the debugging calls). Those are now caught, so all of the tests pass.
The 'cpep8.py' script (renamed to avoid naming conflict) now uses the pep8 module directly, rather than forking subprocesses. On the upside, it is now over twice as fast. Unfortunately, there is no longer any way for it to report its progress, so it's a lot quieter. Such is life. While I was tinkering, I added an option to automatically update the blacklist, and it found a number of files that were already compliant.
I fixed the blacklist to initially include the chirpc/chirpw scripts, though they are subsequently removed in the very next patch. I figured that it was best to demonstrate how we will move forward with bringing the tree into style compliance.
In that vein, I fixed many more of the low-hanging style issues. The remainder of the files have many more issues and may end up deserving their own individual patches.
I included a new patch that fixes the style of the setup.py patch (including the idiom upgrade discussed while reviewing the last series). On top of that, I included another new patch that tries to update the setup.py script to follow the moved drivers, but I am not sure that I got it entirely correct. I had overlooked that file in my last series. Likewise, I moved a few more drivers that I had overlooked.
I included a tweak to run_tests that allows it to be run from locations other than the test directory. I found myself repeatedly trying to run it from the top-level and got annoyed enough to fix it.
Zach Welch (12): Add chirp.logger module (#2347) Use new logger module (#2347) Suppress startup debugging messages (#2347) Add pep8 checker script (#2355) Fix style issues (1/4) (#2355) Fix style issues (2/4) (#2355) Fix style issues (3/4) (#2355) Fix style issues (4/4) (#2355) Fix style issues in setup.py (#2355) Move drivers into their own directory (#2351) Adjust setup.py for relocated drivers (#2351) Allow run_tests to be run from anywhere (#2343)
chirp/bandplan.py | 3 +- chirp/bitwise_grammar.py | 20 ++ chirp/detect.py | 19 +- chirp/directory.py | 31 ++- chirp/drivers/__init__.py | 10 + chirp/{ => drivers}/alinco.py | 0 chirp/{ => drivers}/anytone.py | 13 +- chirp/{ => drivers}/ap510.py | 0 chirp/{ => drivers}/baofeng_uv3r.py | 7 +- chirp/{ => drivers}/bjuv55.py | 7 +- chirp/{ => drivers}/ft1802.py | 3 +- chirp/{ => drivers}/ft1d.py | 17 +- chirp/{ => drivers}/ft2800.py | 20 +- chirp/{ => drivers}/ft50.py | 3 +- chirp/{ => drivers}/ft50_ll.py | 0 chirp/{ => drivers}/ft60.py | 11 +- chirp/{ => drivers}/ft7800.py | 31 +-- chirp/{ => drivers}/ft817.py | 37 ++- chirp/{ => drivers}/ft857.py | 15 +- chirp/{ => drivers}/ft90.py | 56 ++-- chirp/{ => drivers}/ftm350.py | 11 +- chirp/{ => drivers}/generic_csv.py | 95 ++++--- chirp/{ => drivers}/generic_tpe.py | 14 +- chirp/{ => drivers}/generic_xml.py | 9 +- chirp/{ => drivers}/h777.py | 16 +- chirp/{ => drivers}/ic208.py | 4 +- chirp/{ => drivers}/ic2100.py | 4 +- chirp/{ => drivers}/ic2200.py | 4 +- chirp/{ => drivers}/ic2720.py | 4 +- chirp/{ => drivers}/ic2820.py | 4 +- chirp/{ => drivers}/ic9x.py | 3 +- chirp/{ => drivers}/ic9x_icf.py | 3 +- chirp/{ => drivers}/ic9x_icf_ll.py | 0 chirp/{ => drivers}/ic9x_ll.py | 0 chirp/{ => drivers}/icf.py | 0 chirp/{ => drivers}/icomciv.py | 15 +- chirp/{ => drivers}/icq7.py | 4 +- chirp/{ => drivers}/ict70.py | 4 +- chirp/{ => drivers}/ict7h.py | 4 +- chirp/{ => drivers}/ict8.py | 3 +- chirp/{ => drivers}/icw32.py | 4 +- chirp/{ => drivers}/icx8x.py | 3 +- chirp/{ => drivers}/icx8x_ll.py | 0 chirp/{ => drivers}/id31.py | 3 +- chirp/{ => drivers}/id51.py | 3 +- chirp/{ => drivers}/id800.py | 4 +- chirp/{ => drivers}/id880.py | 4 +- chirp/{ => drivers}/idrp.py | 13 +- chirp/{ => drivers}/kenwood_hmk.py | 0 chirp/{ => drivers}/kenwood_itm.py | 0 chirp/{ => drivers}/kenwood_live.py | 11 +- chirp/{ => drivers}/kguv8d.py | 42 ++- chirp/{ => drivers}/kyd.py | 26 +- chirp/{ => drivers}/leixen.py | 5 - chirp/{ => drivers}/puxing.py | 7 +- chirp/{ => drivers}/template.py | 26 +- chirp/{ => drivers}/th9800.py | 36 +-- chirp/{ => drivers}/th_uv3r.py | 7 +- chirp/{ => drivers}/th_uv3r25.py | 2 +- chirp/{ => drivers}/th_uvf8d.py | 0 chirp/{ => drivers}/thd72.py | 10 +- chirp/{ => drivers}/thuv1f.py | 0 chirp/{ => drivers}/tk8102.py | 8 +- chirp/{ => drivers}/tmv71.py | 2 +- chirp/{ => drivers}/tmv71_ll.py | 10 +- chirp/{ => drivers}/uv5r.py | 26 +- chirp/{ => drivers}/uvb5.py | 0 chirp/{ => drivers}/vx170.py | 10 +- chirp/{ => drivers}/vx2.py | 32 +-- chirp/{ => drivers}/vx3.py | 35 +-- chirp/{ => drivers}/vx5.py | 4 +- chirp/{ => drivers}/vx510.py | 4 +- chirp/{ => drivers}/vx6.py | 4 +- chirp/{ => drivers}/vx7.py | 4 +- chirp/{ => drivers}/vx8.py | 15 +- chirp/{ => drivers}/vxa700.py | 0 chirp/{ => drivers}/wouxun.py | 15 +- chirp/{ => drivers}/wouxun_common.py | 9 +- chirp/{ => drivers}/yaesu_clone.py | 13 +- chirp/errors.py | 6 + chirp/import_logic.py | 34 ++- chirp/logger.py | 55 ++-- chirp/memmap.py | 5 +- chirp/platform.py | 37 ++- chirp/radioreference.py | 22 +- chirp/util.py | 15 +- chirp/xml_ll.py | 20 +- chirpc | 498 ++++++++++++++++++----------------- chirpui/bankedit.py | 33 +-- chirpui/clone.py | 19 +- chirpui/cloneprog.py | 7 +- chirpui/config.py | 7 +- chirpui/dstaredit.py | 18 +- chirpui/inputdialog.py | 10 +- chirpui/mainapp.py | 9 +- chirpui/radiobrowser.py | 20 +- chirpui/reporting.py | 32 ++- chirpui/settingsedit.py | 31 ++- chirpui/shiftdialog.py | 7 +- chirpw | 56 ++-- csvdump/__init__.py | 1 - locale/check_parameters.py | 15 +- rpttool | 12 +- run_all_tests.sh | 11 +- setup.py | 70 +++-- share/make_supported.py | 1 + tests/run_tests | 7 +- tests/unit/base.py | 1 + tests/unit/test_bitwise.py | 15 +- tests/unit/test_chirp_common.py | 3 + tests/unit/test_mappingmodel.py | 11 +- tests/unit/test_platform.py | 1 + tests/unit/test_shiftdialog.py | 2 + tools/cpep8.blacklist | 101 +++++++ tools/cpep8.manifest | 4 + tools/cpep8.py | 94 +++++++ 116 files changed, 1264 insertions(+), 927 deletions(-) create mode 100644 chirp/drivers/__init__.py rename chirp/{ => drivers}/alinco.py (100%) rename chirp/{ => drivers}/anytone.py (98%) rename chirp/{ => drivers}/ap510.py (100%) rename chirp/{ => drivers}/baofeng_uv3r.py (99%) rename chirp/{ => drivers}/bjuv55.py (99%) rename chirp/{ => drivers}/ft1802.py (98%) rename chirp/{ => drivers}/ft1d.py (99%) rename chirp/{ => drivers}/ft2800.py (94%) rename chirp/{ => drivers}/ft50.py (95%) rename chirp/{ => drivers}/ft50_ll.py (100%) rename chirp/{ => drivers}/ft60.py (99%) rename chirp/{ => drivers}/ft7800.py (97%) rename chirp/{ => drivers}/ft817.py (97%) rename chirp/{ => drivers}/ft857.py (99%) rename chirp/{ => drivers}/ft90.py (94%) rename chirp/{ => drivers}/ftm350.py (97%) rename chirp/{ => drivers}/generic_csv.py (84%) rename chirp/{ => drivers}/generic_tpe.py (82%) rename chirp/{ => drivers}/generic_xml.py (98%) rename chirp/{ => drivers}/h777.py (98%) rename chirp/{ => drivers}/ic208.py (98%) rename chirp/{ => drivers}/ic2100.py (98%) rename chirp/{ => drivers}/ic2200.py (98%) rename chirp/{ => drivers}/ic2720.py (98%) rename chirp/{ => drivers}/ic2820.py (99%) rename chirp/{ => drivers}/ic9x.py (99%) rename chirp/{ => drivers}/ic9x_icf.py (96%) rename chirp/{ => drivers}/ic9x_icf_ll.py (100%) rename chirp/{ => drivers}/ic9x_ll.py (100%) rename chirp/{ => drivers}/icf.py (100%) rename chirp/{ => drivers}/icomciv.py (96%) rename chirp/{ => drivers}/icq7.py (99%) rename chirp/{ => drivers}/ict70.py (98%) rename chirp/{ => drivers}/ict7h.py (97%) rename chirp/{ => drivers}/ict8.py (97%) rename chirp/{ => drivers}/icw32.py (98%) rename chirp/{ => drivers}/icx8x.py (98%) rename chirp/{ => drivers}/icx8x_ll.py (100%) rename chirp/{ => drivers}/id31.py (99%) rename chirp/{ => drivers}/id51.py (96%) rename chirp/{ => drivers}/id800.py (99%) rename chirp/{ => drivers}/id880.py (99%) rename chirp/{ => drivers}/idrp.py (94%) rename chirp/{ => drivers}/kenwood_hmk.py (100%) rename chirp/{ => drivers}/kenwood_itm.py (100%) rename chirp/{ => drivers}/kenwood_live.py (99%) rename chirp/{ => drivers}/kguv8d.py (96%) rename chirp/{ => drivers}/kyd.py (95%) rename chirp/{ => drivers}/leixen.py (99%) rename chirp/{ => drivers}/puxing.py (99%) rename chirp/{ => drivers}/template.py (84%) rename chirp/{ => drivers}/th9800.py (96%) rename chirp/{ => drivers}/th_uv3r.py (98%) rename chirp/{ => drivers}/th_uv3r25.py (99%) rename chirp/{ => drivers}/th_uvf8d.py (100%) rename chirp/{ => drivers}/thd72.py (98%) rename chirp/{ => drivers}/thuv1f.py (100%) rename chirp/{ => drivers}/tk8102.py (98%) rename chirp/{ => drivers}/tmv71.py (98%) rename chirp/{ => drivers}/tmv71_ll.py (98%) rename chirp/{ => drivers}/uv5r.py (99%) rename chirp/{ => drivers}/uvb5.py (100%) rename chirp/{ => drivers}/vx170.py (94%) rename chirp/{ => drivers}/vx2.py (97%) rename chirp/{ => drivers}/vx3.py (97%) rename chirp/{ => drivers}/vx5.py (98%) rename chirp/{ => drivers}/vx510.py (98%) rename chirp/{ => drivers}/vx6.py (99%) rename chirp/{ => drivers}/vx7.py (99%) rename chirp/{ => drivers}/vx8.py (99%) rename chirp/{ => drivers}/vxa700.py (100%) rename chirp/{ => drivers}/wouxun.py (99%) rename chirp/{ => drivers}/wouxun_common.py (94%) rename chirp/{ => drivers}/yaesu_clone.py (95%) create mode 100644 tools/cpep8.blacklist create mode 100644 tools/cpep8.manifest create mode 100755 tools/cpep8.py