cleanup: pylint, E1304 # (missing-format-string-key) Missing key 'X_name' in format string dictionary
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Mon, 01 Oct 2018 14:29:01 +0300
changeset 2413 803daf19a1b5
parent 2412 22b1879a3c15
child 2414 7fad75e5e63d
cleanup: pylint, E1304 # (missing-format-string-key) Missing key 'X_name' in format string dictionary
etherlab/EthercatCIA402Slave.py
tests/tools/check_source.sh
--- a/etherlab/EthercatCIA402Slave.py	Mon Oct 01 14:13:05 2018 +0300
+++ b/etherlab/EthercatCIA402Slave.py	Mon Oct 01 14:29:01 2018 +0300
@@ -321,7 +321,10 @@
                                else str(param["value"]))
 
                 init_axis_params.append("""\
-        AxsPub.axis->%(param_name)s = %(param_value)s;""" % {"param_value": param_value})
+                AxsPub.axis->%(param_name)s = %(param_value)s;""" % {
+                    "param_value": param_value,
+                    "param_name": param_name,
+                })
 
         # Add each variable in list of variables to map to master list of
         # variables to add to network configuration
--- a/tests/tools/check_source.sh	Mon Oct 01 14:13:05 2018 +0300
+++ b/tests/tools/check_source.sh	Mon Oct 01 14:29:01 2018 +0300
@@ -291,6 +291,7 @@
     enable=$enable,W0623          # (redefine-in-handler) Redefining name 'X' from outer scope (line Y) in exception handler
     enable=$enable,E1310          # (bad-str-strip-call) Suspicious argument in str.strip call
     enable=$enable,E1300          # (bad-format-character) Unsupported format character '"' (0x22) at index 17
+    enable=$enable,E1304          # (missing-format-string-key) Missing key 'X_name' in format string dictionary
     enable=$enable,W0106          # (expression-not-assigned) Expression "X" is assigned to nothing
     enable=$enable,E1136          # (unsubscriptable-object) Value 'X' is unsubscriptable
     enable=$enable,E0602          # (undefined-variable) Undefined variable 'X'