# HG changeset patch
# User Tyler Tidman <tyler.tidman@draak.ca>
# Date 1479236093 18000
#      Tue Nov 15 13:54:53 2016 -0500
# Node ID 410f755f6d05b6d827701aa1aade96c6366da734
# Parent  dbf1814476cd964c4042689205064df7a9b72a26
Minor PEP8 cleanup for some drivers.  Fixes #4161.

diff -r dbf1814476cd -r 410f755f6d05 chirp/drivers/ft2900.py
--- a/chirp/drivers/ft2900.py	Sat Nov 12 16:21:55 2016 -0500
+++ b/chirp/drivers/ft2900.py	Tue Nov 15 13:54:53 2016 -0500
@@ -494,6 +494,7 @@
 
 @directory.register
 class FT2900Radio(YaesuCloneModeRadio):
+
     """Yaesu FT-2900"""
     VENDOR = "Yaesu"
     MODEL = "FT-2900R/1900R"
@@ -778,7 +779,8 @@
         # 7 BELL
         opts = ["Off", "1", "3", "5", "8", "Continuous"]
         ctcss.append(RadioSetting("bell", "Bell Repetitions",
-                                  RadioSettingValueList(opts, opts[_settings.bell])))
+                                  RadioSettingValueList(opts, opts[
+                                                        _settings.bell])))
 
         # 8 BNK.LNK
         for i in range(0, 8):
@@ -802,7 +804,8 @@
         # 11 CW.ID
         opts = ["Off", "On"]
         arts.append(RadioSetting("cw_id", "CW ID Enable",
-                                 RadioSettingValueList(opts, opts[_settings.cw_id])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.cw_id])))
 
         cw_id_text = ""
         for i in _settings.cw_id_string:
@@ -832,14 +835,16 @@
                 "10WPM", "11WPM", "12WPM", "13WPM", "15WPM", "17WPM",
                 "20WPM", "24WPM", "30WPM", "40WPM"]
         misc.append(RadioSetting("cw_trng", "CW Training",
-                                 RadioSettingValueList(opts, opts[_settings.cw_trng])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.cw_trng])))
 
         # todo: make the setting of the units here affect the display
         # of the speed.  Not critical, but would be slick.
         opts = ["CPM", "WPM"]
         misc.append(RadioSetting("cw_trng_units", "CW Training Units",
                                  RadioSettingValueList(opts,
-                                                       opts[_settings.cw_trng_units])))
+                                                       opts[_settings.
+                                                            cw_trng_units])))
 
         # 13 DC VLT - a read-only status, so nothing to do here
 
@@ -920,7 +925,8 @@
         # 22 INT.CD
         opts = ["DTMF %X" % (x) for x in range(0, 16)]
         wires.append(RadioSetting("int_cd", "Access Number for WiRES(TM)",
-                                  RadioSettingValueList(opts, opts[_settings.int_cd])))
+                                  RadioSettingValueList(opts, opts[
+                                                        _settings.int_cd])))
 
         # 23 ING MD
         opts = ["Sister Radio Group", "Friends Radio Group"]
@@ -1103,24 +1109,28 @@
         # 41 RESUME
         opts = ["3 Sec", "5 Sec", "10 Sec", "Busy", "Hold"]
         scan.append(RadioSetting("resume", "Scan Resume Mode",
-                                 RadioSettingValueList(opts, opts[_settings.resume])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.resume])))
 
         # 42 RF.SQL
         opts = ["Off"] + ["S-%d" % (x) for x in range(1, 10)]
         misc.append(RadioSetting("rf_sql", "RF Squelch Threshold",
-                                 RadioSettingValueList(opts, opts[_settings.rf_sql])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.rf_sql])))
 
         # 43 RPT - per channel attribute, nothing to do here
 
         # 44 RVRT
         opts = ["Off", "On"]
         misc.append(RadioSetting("revert", "Priority Revert",
-                                 RadioSettingValueList(opts, opts[_settings.revert])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.revert])))
 
         # 45 S.SRCH
         opts = ["Single", "Continuous"]
         misc.append(RadioSetting("s_search", "Smart Search Sweep Mode",
-                                 RadioSettingValueList(opts, opts[_settings.s_search])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.s_search])))
 
         # 46 SHIFT - per channel setting, nothing to do here
 
@@ -1166,12 +1176,14 @@
         # 57 WX.ALT
         opts = ["Off", "On"]
         misc.append(RadioSetting("wx_alert", "Weather Alert Scan",
-                                 RadioSettingValueList(opts, opts[_settings.wx_alert])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.wx_alert])))
 
         # 58 WX.VOL
         opts = ["Normal", "Maximum"]
         misc.append(RadioSetting("wx_vol_max", "Weather Alert Volume",
-                                 RadioSettingValueList(opts, opts[_settings.wx_vol_max])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.wx_vol_max])))
 
         # 59 W/N DV - this is a per-channel attribute, nothing to do here
 
@@ -1235,8 +1247,9 @@
 # to the R (USA) version, except for the model number and ID Block.  We
 # create and register a class for it, with only the needed overrides
 # NOTE: Disabled until detection is fixed
-#@directory.register
+# @directory.register
 class FT2900ERadio(FT2900Radio):
+
     """Yaesu FT-2900E"""
     MODEL = "FT-2900E/1900E"
     VARIANT = "E"
diff -r dbf1814476cd -r 410f755f6d05 chirp/drivers/ft60.py
--- a/chirp/drivers/ft60.py	Sat Nov 12 16:21:55 2016 -0500
+++ b/chirp/drivers/ft60.py	Tue Nov 15 13:54:53 2016 -0500
@@ -340,6 +340,7 @@
 
 @directory.register
 class FT60Radio(yaesu_clone.YaesuCloneModeRadio):
+
     """Yaesu FT-60"""
     BAUD_RATE = 9600
     VENDOR = "Yaesu"
@@ -487,27 +488,32 @@
         # BELL
         opts = ["OFF", "1T", "3T", "5T", "8T", "CONT"]
         ctcss.append(RadioSetting("bell", "Bell Repetitions",
-                                  RadioSettingValueList(opts, opts[_settings.bell])))
+                                  RadioSettingValueList(opts, opts[
+                                                        _settings.bell])))
 
         # BSY.LED
         opts = ["ON", "OFF"]
         misc.append(RadioSetting("bsy_led", "Busy LED",
-                                 RadioSettingValueList(opts, opts[_settings.bsy_led])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.bsy_led])))
 
         # DCS.NR
         opts = ["TR/X N", "RX R", "TX R", "T/RX R"]
         ctcss.append(RadioSetting("dcs_nr", "\"Inverted\" DCS Code Decoding",
-                                  RadioSettingValueList(opts, opts[_settings.dcs_nr])))
+                                  RadioSettingValueList(opts, opts[
+                                                        _settings.dcs_nr])))
 
         # DT.DLY
         opts = ["50 MS", "100 MS", "250 MS", "450 MS", "750 MS", "1000 MS"]
         ctcss.append(RadioSetting("dt_dly", "DTMF Autodialer Delay Time",
-                                  RadioSettingValueList(opts, opts[_settings.dt_dly])))
+                                  RadioSettingValueList(opts, opts[
+                                                        _settings.dt_dly])))
 
         # DT.SPD
         opts = ["50 MS", "100 MS"]
         ctcss.append(RadioSetting("dt_spd", "DTMF Autodialer Sending Speed",
-                                  RadioSettingValueList(opts, opts[_settings.dt_spd])))
+                                  RadioSettingValueList(opts, opts[
+                                                        _settings.dt_spd])))
 
         # DT.WRT
         for i in range(0, 9):
@@ -535,7 +541,8 @@
         # EDG.BEP
         opts = ["OFF", "ON"]
         misc.append(RadioSetting("edg_bep", "Band Edge Beeper",
-                                 RadioSettingValueList(opts, opts[_settings.edg_bep])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.edg_bep])))
 
         # I.NET
         opts = ["OFF", "COD", "MEM"]
@@ -553,7 +560,8 @@
                 "CODE 5", "CODE 6", "CODE 7", "CODE 8", "CODE 9",
                 "CODE A", "CODE B", "CODE C", "CODE D", "CODE E", "CODE F"]
         wires.append(RadioSetting("int_cd", "Access Number for WiRES(TM)",
-                                  RadioSettingValueList(opts, opts[_settings.int_cd])))
+                                  RadioSettingValueList(opts, opts[
+                                                        _settings.int_cd])))
 
         # INT.MR
         opts = ["d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9"]
@@ -564,7 +572,8 @@
         # LAMP
         opts = ["KEY", "5SEC", "TOGGLE"]
         switch.append(RadioSetting("lamp", "Lamp Mode",
-                                   RadioSettingValueList(opts, opts[_settings.lamp])))
+                                   RadioSettingValueList(opts, opts[
+                                                         _settings.lamp])))
 
         # LOCK
         opts = ["LK KEY", "LKDIAL", "LK K+D", "LK PTT",
@@ -581,33 +590,39 @@
         # M/T-CL
         opts = ["MONI", "T-CALL"]
         switch.append(RadioSetting("mt_cl", "MONI Switch Function",
-                                   RadioSettingValueList(opts, opts[_settings.mt_cl])))
+                                   RadioSettingValueList(opts, opts[
+                                                         _settings.mt_cl])))
 
         # PAG.ABK
         opts = ["OFF", "ON"]
         eai.append(RadioSetting("pag_abk", "Paging Answer Back",
-                                RadioSettingValueList(opts, opts[_settings.pag_abk])))
+                                RadioSettingValueList(opts, opts[
+                                                      _settings.pag_abk])))
 
         # RESUME
         opts = ["TIME", "HOLD", "BUSY"]
         scan.append(RadioSetting("resume", "Scan Resume Mode",
-                                 RadioSettingValueList(opts, opts[_settings.resume])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.resume])))
 
         # REV/HM
         opts = ["REV", "HOME"]
         switch.append(RadioSetting("rev_hm", "HM/RV Key Function",
-                                   RadioSettingValueList(opts, opts[_settings.rev_hm])))
+                                   RadioSettingValueList(opts, opts[
+                                                         _settings.rev_hm])))
 
         # RF.SQL
         opts = ["OFF", "S-1", "S-2", "S-3", "S-4", "S-5", "S-6",
                 "S-7", "S-8", "S-FULL"]
         misc.append(RadioSetting("rf_sql", "RF Squelch Threshold",
-                                 RadioSettingValueList(opts, opts[_settings.rf_sql])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.rf_sql])))
 
         # PRI.RVT
         opts = ["OFF", "ON"]
         scan.append(RadioSetting("pri_rvt", "Priority Revert",
-                                 RadioSettingValueList(opts, opts[_settings.pri_rvt])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.pri_rvt])))
 
         # RXSAVE
         opts = ["OFF", "200 MS", "300 MS", "500 MS", "1 S", "2 S"]
@@ -618,7 +633,8 @@
         # S.SRCH
         opts = ["SINGLE", "CONT"]
         misc.append(RadioSetting("ssrch", "Smart Search Sweep Mode",
-                                 RadioSettingValueList(opts, opts[_settings.ssrch])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.ssrch])))
 
         # SCN.MD
         opts = ["MEM", "ONLY"]
@@ -629,32 +645,38 @@
         # SCN.LMP
         opts = ["OFF", "ON"]
         scan.append(RadioSetting("scn_lmp", "Scan Lamp",
-                                 RadioSettingValueList(opts, opts[_settings.scn_lmp])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.scn_lmp])))
 
         # TOT
         opts = ["OFF"] + ["%dMIN" % (x) for x in range(1, 30 + 1)]
         misc.append(RadioSetting("tot", "Timeout Timer",
-                                 RadioSettingValueList(opts, opts[_settings.tot])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.tot])))
 
         # TX.LED
         opts = ["ON", "OFF"]
         misc.append(RadioSetting("tx_led", "TX LED",
-                                 RadioSettingValueList(opts, opts[_settings.tx_led])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.tx_led])))
 
         # TXSAVE
         opts = ["OFF", "ON"]
         power.append(RadioSetting("txsave", "Transmitter Battery Saver",
-                                  RadioSettingValueList(opts, opts[_settings.txsave])))
+                                  RadioSettingValueList(opts, opts[
+                                                        _settings.txsave])))
 
         # VFO.BND
         opts = ["BAND", "ALL"]
         misc.append(RadioSetting("vfo_bnd", "VFO Band Edge Limiting",
-                                 RadioSettingValueList(opts, opts[_settings.vfo_bnd])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.vfo_bnd])))
 
         # WX.ALT
         opts = ["OFF", "ON"]
         scan.append(RadioSetting("wx_alt", "Weather Alert Scan",
-                                 RadioSettingValueList(opts, opts[_settings.wx_alt])))
+                                 RadioSettingValueList(opts, opts[
+                                                       _settings.wx_alt])))
 
         # MBS
         for i in range(0, 10):
diff -r dbf1814476cd -r 410f755f6d05 chirp/drivers/ft817.py
--- a/chirp/drivers/ft817.py	Sat Nov 12 16:21:55 2016 -0500
+++ b/chirp/drivers/ft817.py	Tue Nov 15 13:54:53 2016 -0500
@@ -33,6 +33,7 @@
 
 @directory.register
 class FT817Radio(yaesu_clone.YaesuCloneModeRadio):
+
     """Yaesu FT-817"""
     BAUD_RATE = 9600
     MODEL = "FT-817"
@@ -1007,7 +1008,8 @@
         antenna.append(rs)
 
         st = RadioSettingValueString(0, 7, ''.join([self._CALLSIGN_CHARSET[x]
-                                                    for x in self._memobj.callsign]))
+                                                   for x in self._memobj.
+                                                   callsign]))
         st.set_charset(self._CALLSIGN_CHARSET)
         rs = RadioSetting("callsign", "Callsign", st)
         cw.append(rs)
@@ -1084,7 +1086,8 @@
                     setting = element.get_name()
                 try:
                     LOG.debug("Setting %s(%s) <= %s" % (setting,
-                                                        getattr(obj, setting), element.value))
+                                                        getattr(obj, setting),
+                                                        element.value))
                 except AttributeError:
                     LOG.debug("Setting %s <= %s" % (setting, element.value))
                 if setting == "contrast":
@@ -1102,6 +1105,7 @@
 
 @directory.register
 class FT817NDRadio(FT817Radio):
+
     """Yaesu FT-817ND"""
     MODEL = "FT-817ND"
 
@@ -1113,6 +1117,7 @@
 
 @directory.register
 class FT817NDUSRadio(FT817Radio):
+
     """Yaesu FT-817ND (US version)"""
     # seems that radios configured for 5MHz operations send one paket
     # more than others so we have to distinguish sub models
diff -r dbf1814476cd -r 410f755f6d05 chirp/drivers/kguv8d.py
--- a/chirp/drivers/kguv8d.py	Sat Nov 12 16:21:55 2016 -0500
+++ b/chirp/drivers/kguv8d.py	Tue Nov 15 13:54:53 2016 -0500
@@ -276,6 +276,7 @@
 @directory.register
 class KGUV8DRadio(chirp_common.CloneModeRadio,
                   chirp_common.ExperimentalRadio):
+
     """Wouxun KG-UV8D"""
     VENDOR = "Wouxun"
     MODEL = "KG-UV8D"
@@ -341,7 +342,7 @@
 #  31:34    VHF rx upper limit
 #  35:38    VHF tx lower limit
 #  39:42    VHF tx upper limit
-##
+#
     @classmethod
     def match_model(cls, filedata, filename):
         return cls._file_ident in filedata[0x400:0x408]
@@ -695,7 +696,8 @@
         cfg_grp.append(rs)
         rs = RadioSetting("language", "Language",
                           RadioSettingValueList(LANGUAGE_LIST,
-                                                LANGUAGE_LIST[_settings.language]))
+                                                LANGUAGE_LIST[_settings.
+                                                              language]))
         cfg_grp.append(rs)
         rs = RadioSetting("timeout", "Timeout Timer",
                           RadioSettingValueInteger(15, 900,
@@ -724,11 +726,13 @@
         cfg_grp.append(rs)
         rs = RadioSetting("backlight", "Backlight",
                           RadioSettingValueList(BACKLIGHT_LIST,
-                                                BACKLIGHT_LIST[_settings.backlight]))
+                                                BACKLIGHT_LIST[_settings.
+                                                               backlight]))
         cfg_grp.append(rs)
         rs = RadioSetting("dtmf_st", "DTMF Sidetone",
                           RadioSettingValueList(DTMFST_LIST,
-                                                DTMFST_LIST[_settings.dtmf_st]))
+                                                DTMFST_LIST[_settings.
+                                                            dtmf_st]))
         cfg_grp.append(rs)
         rs = RadioSetting("ani-id_sw", "ANI-ID Switch",
                           RadioSettingValueBoolean(_settings.ani_sw))
@@ -743,7 +747,8 @@
         cfg_grp.append(rs)
         rs = RadioSetting("scan_rev", "Scan Mode",
                           RadioSettingValueList(SCANMODE_LIST,
-                                                SCANMODE_LIST[_settings.scan_rev]))
+                                                SCANMODE_LIST[_settings.
+                                                              scan_rev]))
         cfg_grp.append(rs)
         rs = RadioSetting("vox", "VOX",
                           RadioSettingValueList(LIST_10,
@@ -757,11 +762,13 @@
         cfg_grp.append(rs)
         rs = RadioSetting("rpt_mode", "Radio Mode",
                           RadioSettingValueList(RPTMODE_LIST,
-                                                RPTMODE_LIST[_settings.rpt_mode]))
+                                                RPTMODE_LIST[_settings.
+                                                             rpt_mode]))
         cfg_grp.append(rs)
         rs = RadioSetting("rpt_set", "Repeater Setting",
                           RadioSettingValueList(RPTSET_LIST,
-                                                RPTSET_LIST[_settings.rpt_set]))
+                                                RPTSET_LIST[_settings.
+                                                            rpt_set]))
         cfg_grp.append(rs)
         rs = RadioSetting("rpt_spk", "Repeater Mode Speaker",
                           RadioSettingValueBoolean(_settings.rpt_spk))
@@ -771,11 +778,13 @@
         cfg_grp.append(rs)
         rs = RadioSetting("dtmf_tx_time", "DTMF Tx Duration",
                           RadioSettingValueList(DTMF_TIMES,
-                                                DTMF_TIMES[_settings.dtmf_tx_time]))
+                                                DTMF_TIMES[_settings.
+                                                           dtmf_tx_time]))
         cfg_grp.append(rs)
         rs = RadioSetting("dtmf_interval", "DTMF Interval",
                           RadioSettingValueList(DTMF_TIMES,
-                                                DTMF_TIMES[_settings.dtmf_interval]))
+                                                DTMF_TIMES[_settings.
+                                                           dtmf_interval]))
         cfg_grp.append(rs)
         rs = RadioSetting("alert", "Alert Tone",
                           RadioSettingValueList(ALERTS_LIST,
@@ -786,7 +795,8 @@
         cfg_grp.append(rs)
         rs = RadioSetting("rpt_hold", "Repeater Hold Time",
                           RadioSettingValueList(HOLD_TIMES,
-                                                HOLD_TIMES[_settings.rpt_hold]))
+                                                HOLD_TIMES[_settings.
+                                                           rpt_hold]))
         cfg_grp.append(rs)
         rs = RadioSetting("scan_det", "Scan DET",
                           RadioSettingValueBoolean(_settings.scan_det))
@@ -797,7 +807,8 @@
         cfg_grp.append(rs)
         rs = RadioSetting("smuteset", "SubFreq Mute",
                           RadioSettingValueList(SMUTESET_LIST,
-                                                SMUTESET_LIST[_settings.smuteset]))
+                                                SMUTESET_LIST[_settings.
+                                                              smuteset]))
         cfg_grp.append(rs)
         _pwd = "".join(map(chr, _settings.mode_sw_pwd))
         val = RadioSettingValueString(0, 6, _pwd)
@@ -814,7 +825,8 @@
         #
         rs = RadioSetting("vfoa_mode", "VFO A Workmode",
                           RadioSettingValueList(WORKMODE_LIST,
-                                                WORKMODE_LIST[_settings.workmode_a]))
+                                                WORKMODE_LIST[_settings.
+                                                              workmode_a]))
         vfoa_grp.append(rs)
         rs = RadioSetting("vfoa_chan", "VFO A Channel",
                           RadioSettingValueInteger(1, 999, _settings.work_cha))
diff -r dbf1814476cd -r 410f755f6d05 chirp/drivers/leixen.py
--- a/chirp/drivers/leixen.py	Sat Nov 12 16:21:55 2016 -0500
+++ b/chirp/drivers/leixen.py	Tue Nov 15 13:54:53 2016 -0500
@@ -362,6 +362,7 @@
 
 @directory.register
 class LeixenVV898Radio(chirp_common.CloneModeRadio):
+
     """Leixen VV-898"""
     VENDOR = "Leixen"
     MODEL = "VV-898"
@@ -944,6 +945,7 @@
 
 @directory.register
 class JetstreamJT270MRadio(LeixenVV898Radio):
+
     """Jetstream JT270M"""
     VENDOR = "Jetstream"
     MODEL = "JT270M"
@@ -953,13 +955,16 @@
 
 
 class VV898E(chirp_common.Alias):
-    '''Leixen has called this radio both 898E and S historically, ident is identical'''
+
+    '''Leixen has called this radio both 898E and S historically, ident is
+    identical'''
     VENDOR = "Leixen"
     MODEL = "VV-898E"
 
 
 @directory.register
 class LeixenVV898SRadio(LeixenVV898Radio):
+
     """Leixen VV-898S, also VV-898E which is identical"""
     VENDOR = "Leixen"
     MODEL = "VV-898S"
diff -r dbf1814476cd -r 410f755f6d05 chirp/drivers/thd72.py
--- a/chirp/drivers/thd72.py	Sat Nov 12 16:21:55 2016 -0500
+++ b/chirp/drivers/thd72.py	Tue Nov 15 13:54:53 2016 -0500
@@ -189,6 +189,7 @@
 
 @directory.register
 class THD72Radio(chirp_common.CloneModeRadio):
+
     BAUD_RATE = 9600
     VENDOR = "Kenwood"
     MODEL = "TH-D72 (clone mode)"
@@ -202,8 +203,9 @@
     _LCD_CONTRAST = ["Level %d" % x for x in range(1, 16)]
     _LAMP_CONTROL = ["Manual", "Auto"]
     _LAMP_TIMER = ["Seconds %d" % x for x in range(2, 11)]
-    _BATTERY_SAVER = ["OFF", "0.03 Seconds", "0.2 Seconds", "0.4 Seconds", "0.6 Seconds",
-                      "0.8 Seconds", "1 Seconds", "2 Seconds", "3 Seconds", "4 Seconds", "5 Seconds"]
+    _BATTERY_SAVER = ["OFF", "0.03 Seconds", "0.2 Seconds", "0.4 Seconds",
+                      "0.6 Seconds", "0.8 Seconds", "1 Seconds", "2 Seconds",
+                      "3 Seconds", "4 Seconds", "5 Seconds"]
     _APO = ["OFF", "15 Minutes", "30 Minutes", "60 Minutes"]
     _AUDIO_BALANCE = ["Center", "A +50%", "A +100%", "B +50%", "B +100%"]
     _KEY_BEEP = ["OFF", "Radio & GPS", "Radio Only", "GPS Only"]
diff -r dbf1814476cd -r 410f755f6d05 chirp/drivers/uv5r.py
--- a/chirp/drivers/uv5r.py	Sat Nov 12 16:21:55 2016 -0500
+++ b/chirp/drivers/uv5r.py	Tue Nov 15 13:54:53 2016 -0500
@@ -289,8 +289,8 @@
 BASETYPE_F8HP = ["BFP3V3 F", "N5R-3", "N5R3", "F5R3", "BFT"]
 BASETYPE_UV82HP = ["N82-3", "N823"]
 BASETYPE_LIST = BASETYPE_UV5R + BASETYPE_F11 + BASETYPE_UV82 + \
-                BASETYPE_BJ55 + BASETYPE_UV6 + BASETYPE_KT980HP + \
-                BASETYPE_F8HP + BASETYPE_UV82HP
+    BASETYPE_BJ55 + BASETYPE_UV6 + BASETYPE_KT980HP + \
+    BASETYPE_F8HP + BASETYPE_UV82HP
 
 AB_LIST = ["A", "B"]
 ALMOD_LIST = ["Site", "Tone", "Code"]
@@ -607,6 +607,7 @@
 
 class BaofengUV5R(chirp_common.CloneModeRadio,
                   chirp_common.ExperimentalRadio):
+
     """Baofeng UV-5R"""
     VENDOR = "Baofeng"
     MODEL = "UV-5R"
@@ -861,7 +862,7 @@
             return
 
         was_empty = False
-        # same method as used in get_memory to find 
+        # same method as used in get_memory to find
         # out whether a raw memory is empty
         if _mem.get_raw()[0] == "\xff":
             was_empty = True
@@ -944,7 +945,7 @@
             _mem.lowpower = 0
 
         if not was_empty:
-            #restoring old extra-settings (issue 4121
+            # restoring old extra-settings (issue 4121
             _mem.bcl.set_value(prev_bcl)
             _mem.scode.set_value(prev_scode)
             _mem.pttid.set_value(prev_pttid)
@@ -1361,14 +1362,14 @@
                     value /= 10
 
             val1a = RadioSettingValueString(
-                        0, 10, convert_bytes_to_offset(_vfoa.offset))
+                0, 10, convert_bytes_to_offset(_vfoa.offset))
             rs = RadioSetting("vfoa.offset",
                               "VFO A Offset (0.00-69.95)", val1a)
             rs.set_apply_callback(apply_offset, _vfoa)
             workmode.append(rs)
 
             val1b = RadioSettingValueString(
-                        0, 10, convert_bytes_to_offset(_vfob.offset))
+                0, 10, convert_bytes_to_offset(_vfob.offset))
             rs = RadioSetting("vfob.offset",
                               "VFO B Offset (0.00-69.95)", val1b)
             rs.set_apply_callback(apply_offset, _vfob)
@@ -1664,6 +1665,7 @@
 
 @directory.register
 class BaofengUV6Radio(BaofengUV5R):
+
     """Baofeng UV-6/UV-7"""
     VENDOR = "Baofeng"
     MODEL = "UV-6"
diff -r dbf1814476cd -r 410f755f6d05 chirp/settings.py
--- a/chirp/settings.py	Sat Nov 12 16:21:55 2016 -0500
+++ b/chirp/settings.py	Tue Nov 15 13:54:53 2016 -0500
@@ -17,16 +17,19 @@
 
 
 class InvalidValueError(Exception):
+
     """An invalid value was specified for a given setting"""
     pass
 
 
 class InternalError(Exception):
+
     """A driver provided an invalid settings object structure"""
     pass
 
 
 class RadioSettingValue:
+
     """Base class for a single radio setting"""
 
     def __init__(self):
@@ -69,6 +72,7 @@
 
 
 class RadioSettingValueInteger(RadioSettingValue):
+
     """An integer setting"""
 
     def __init__(self, minval, maxval, current, step=1):
@@ -102,6 +106,7 @@
 
 
 class RadioSettingValueFloat(RadioSettingValue):
+
     """A floating-point setting"""
 
     def __init__(self, minval, maxval, current, resolution=0.001, precision=4):
@@ -142,6 +147,7 @@
 
 
 class RadioSettingValueBoolean(RadioSettingValue):
+
     """A boolean setting"""
 
     def __init__(self, current):
@@ -160,6 +166,7 @@
 
 
 class RadioSettingValueList(RadioSettingValue):
+
     """A list-of-strings setting"""
 
     def __init__(self, options, current):
@@ -181,6 +188,7 @@
 
 
 class RadioSettingValueString(RadioSettingValue):
+
     """A string setting"""
 
     def __init__(self, minlength, maxlength, current,
@@ -213,6 +221,7 @@
 
 
 class RadioSettingValueMap(RadioSettingValueList):
+
     """Map User Options to Radio Memory Values
 
     Provides User Option list for GUI, maintains state, verifies new values,
@@ -253,7 +262,8 @@
                 "%s is not valid for this setting" % mem_val)
 
     def get_mem_val(self):
-        """Get the mem val corresponding to the currently selected user option"""
+        """Get the mem val corresponding to the currently selected user
+        option"""
         return self._mem_vals[self._options.index(self.get_value())]
 
     def __trunc__(self):
@@ -286,6 +296,7 @@
 
 
 class RadioSettingGroup(object):
+
     """A group of settings"""
 
     def _validate(self, element):
@@ -331,6 +342,7 @@
 
     def __iter__(self):
         class RSGIterator:
+
             """Iterator for a RadioSettingGroup"""
 
             def __init__(self, rsg):
@@ -377,6 +389,7 @@
 
 
 class RadioSetting(RadioSettingGroup):
+
     """A single setting, which could be an array of items like a group"""
 
     def __init__(self, *args):
diff -r dbf1814476cd -r 410f755f6d05 chirp/ui/mainapp.py
--- a/chirp/ui/mainapp.py	Sat Nov 12 16:21:55 2016 -0500
+++ b/chirp/ui/mainapp.py	Tue Nov 15 13:54:53 2016 -0500
@@ -1376,7 +1376,8 @@
 
     def do_change_language(self):
         langs = ["Auto", "English", "Polish", "Italian", "Dutch", "German",
-                 "Hungarian", "Russian", "Portuguese (BR)", "French", "Spanish"]
+                 "Hungarian", "Russian", "Portuguese (BR)", "French",
+                 "Spanish"]
         d = inputdialog.ChoiceDialog(langs, parent=self,
                                      title="Choose Language")
         d.label.set_text(_("Choose a language or Auto to use the "
diff -r dbf1814476cd -r 410f755f6d05 chirp/ui/settingsedit.py
--- a/chirp/ui/settingsedit.py	Sat Nov 12 16:21:55 2016 -0500
+++ b/chirp/ui/settingsedit.py	Tue Nov 15 13:54:53 2016 -0500
@@ -25,12 +25,14 @@
 
 
 class RadioSettingProxy(settings.RadioSetting):
+
     def __init__(self, setting, editor):
         self._setting = setting
         self._editor = editor
 
 
 class SettingsEditor(common.Editor):
+
     def __init__(self, rthread):
         super(SettingsEditor, self).__init__(rthread)
 
@@ -56,7 +58,6 @@
         scrolled_window.show()
         paned.pack1(scrolled_window)
 
-
         # The settings notebook
         self._notebook = gtk.Notebook()
         self._notebook.set_show_tabs(False)
