[chirp_devel] [PATCH] Driver Maintenance: baofeng_common.py

Jim Unroe
Thu Dec 31 18:27:38 PST 2020


# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1609468015 18000
#      Thu Dec 31 21:26:55 2020 -0500
# Node ID 31d355946d47e8b575ac5378434aae5fdf4364df
# Parent  8dff5da71b9effd76a376c0b2091bc7fbe8d493c
Driver Maintenance: baofeng_common.py

1. Add to PEP8 manifest
2. Perform PEP8 cleanup

fixes #8613

diff -r 8dff5da71b9e -r 31d355946d47 chirp/drivers/baofeng_common.py
--- a/chirp/drivers/baofeng_common.py	Thu Dec 31 21:14:30 2020 -0500
+++ b/chirp/drivers/baofeng_common.py	Thu Dec 31 21:26:55 2020 -0500
@@ -140,7 +140,7 @@
     if not ident.startswith("\xaa") or not ident.endswith("\xdd"):
         # bad response
         msg = "Unexpected response, got this:"
-        msg +=  util.hexprint(ident)
+        msg += util.hexprint(ident)
         LOG.debug(msg)
         raise errors.RadioError("Unexpected response from radio.")
 
@@ -307,6 +307,7 @@
     # if you get here is because the freq pairs are split
     return True
 
+
 class BaofengCommonHT(chirp_common.CloneModeRadio,
                       chirp_common.ExperimentalRadio):
     """Baofeng HT Sytle Radios"""
@@ -342,7 +343,7 @@
             LOG.exception('Unexpected error during upload')
             raise errors.RadioError('Unexpected error communicating '
                                     'with the radio')
-                                    
+
     def get_features(self):
         """Get the radio's features"""
 
@@ -380,7 +381,7 @@
         rf.valid_tuning_steps = [2.5, 5.0, 6.25, 10.0, 12.5, 20.0, 25.0, 50.0]
 
         return rf
-        
+
     def _is_txinh(self, _mem):
         raw_tx = ""
         for i in range(0, 4):
@@ -408,7 +409,8 @@
             # TX freq set
             offset = (int(_mem.txfreq) * 10) - mem.freq
             if offset != 0:
-                if _split(self.get_features(), mem.freq, int(_mem.txfreq) * 10):
+                if _split(self.get_features(), mem.freq, int(
+                          _mem.txfreq) * 10):
                     mem.duplex = "split"
                     mem.offset = int(_mem.txfreq) * 10
                 elif offset < 0:
diff -r 8dff5da71b9e -r 31d355946d47 tools/cpep8.manifest
--- a/tools/cpep8.manifest	Thu Dec 31 21:14:30 2020 -0500
+++ b/tools/cpep8.manifest	Thu Dec 31 21:26:55 2020 -0500
@@ -15,6 +15,7 @@
 ./chirp/drivers/anytone.py
 ./chirp/drivers/anytone_ht.py
 ./chirp/drivers/ap510.py
+./chirp/drivers/baofeng_common.py
 ./chirp/drivers/baofeng_uv3r.py
 ./chirp/drivers/baofeng_wp970i.py
 ./chirp/drivers/bjuv55.py



More information about the chirp_devel mailing list