[chirp_devel] [PATCH 05/22] Fix style issues in make_supported.py (#2355)

Zach Welch
Sat Feb 28 22:54:42 PST 2015


# HG changeset patch
# User Zach Welch <zach at mandolincreekfarm.com>
# Fake Node ID 38a9f8ff91f243e3bcad852159dd32ad6800903c

Fix style issues in make_supported.py (#2355)

Like run_tests, this script monkeys with the path to find the chirp
modules, so it gets a similar exception.

diff --git a/share/make_supported.py b/share/make_supported.py
index 61ddf4d..4ef7031 100755
--- a/share/make_supported.py
+++ b/share/make_supported.py
@@ -12,8 +12,8 @@ from chirp import *
 sys.stdout = tmp
 
 RF = chirp_common.RadioFeatures()
-KEYS = [x for x in sorted(RF.__dict__.keys()) \
-            if "_" in x and not x.startswith("_")]
+KEYS = [x for x in sorted(RF.__dict__.keys())
+        if "_" in x and not x.startswith("_")]
 
 RADIO_TYPES = {
     'Clone': chirp_common.CloneModeRadio,
@@ -41,13 +41,13 @@ def supported_row(radio, odd):
         if key == "valid_bands":
             value = ["%s-%s MHz" % (chirp_common.format_freq(x),
                                     chirp_common.format_freq(y))
-                     for x,y in value]
+                     for x, y in value]
 
         if key in ["valid_bands", "valid_modes", "valid_power_levels",
                    "valid_tuning_steps"]:
             try:
-                value = ", ".join([str(x) for x in value \
-                                       if not str(x).startswith("?")])
+                value = ", ".join([str(x) for x in value
+                                   if not str(x).startswith("?")])
             except Exception, e:
                 raise
 
@@ -75,6 +75,7 @@ def supported_row(radio, odd):
     row += "</tr>\n"
     return row
 
+
 def header_row():
     row = "<thead><tr>"
     row += "<th>Radio</th>\n"
@@ -85,6 +86,7 @@ def header_row():
     row += "</tr></thead>\n"
     return row
 
+
 print """
 <style>
 td {
@@ -114,13 +116,12 @@ span.false {
 <table>
 """
 
-models = {
-    "Icom" : [],
-    "Kenwood" : [],
-    "Yaesu" : [],
-    "Alinco" : [],
-    "z_Other" : [],
-}
+models = {"Icom": [],
+          "Kenwood": [],
+          "Yaesu": [],
+          "Alinco": [],
+          "z_Other": [],
+          }
 
 exclude = [directory.DRV_TO_RADIO["Icom_7200"]]
 
diff --git a/tools/cpep8.blacklist b/tools/cpep8.blacklist
index 3d7e95c..aad6343 100644
--- a/tools/cpep8.blacklist
+++ b/tools/cpep8.blacklist
@@ -90,6 +90,5 @@
 ./chirpui/memedit.py
 ./chirpui/miscwidgets.py
 ./chirpui/reporting.py
-./share/make_supported.py
 ./tools/bitdiff.py
 ./tools/img2thd72.py
diff --git a/tools/cpep8.exceptions b/tools/cpep8.exceptions
index 3aafd1d..186c181 100644
--- a/tools/cpep8.exceptions
+++ b/tools/cpep8.exceptions
@@ -2,5 +2,6 @@
 # Each line must contain the file name, a tab, and a comma-separated list
 # of style rules to ignore in that file.  This mechanism should be used
 # sparingly and as a measure of last resort.
+./share/make_supported.py	E402
 ./tests/run_tests	E402
 ./tests/unit/test_memedit_edits.py	E402




More information about the chirp_devel mailing list