clean etherlab: pylint,W0108 # (unnecessary-lambda) Lambda may not be necessary
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Sat, 29 Sep 2018 16:23:20 +0300
changeset 2391 3315e621d7fb
parent 2390 81116c5db60f
child 2392 aad985da14f7
clean etherlab: pylint,W0108 # (unnecessary-lambda) Lambda may not be necessary
etherlab/EthercatCIA402Slave.py
etherlab/EthercatMaster.py
--- a/etherlab/EthercatCIA402Slave.py	Sat Sep 29 16:19:15 2018 +0300
+++ b/etherlab/EthercatCIA402Slave.py	Sat Sep 29 16:23:20 2018 +0300
@@ -200,7 +200,7 @@
     def CTNGenerate_C(self, buildpath, locations):
         current_location = self.GetCurrentLocation()
 
-        location_str = "_".join(map(lambda x: str(x), current_location))
+        location_str = "_".join(map(str, current_location))
         slave_pos = self.GetSlavePos()
         MCL_headers = Headers
 
@@ -326,7 +326,7 @@
         [fieldbus_interface_declaration, fieldbus_interface_definition,
          init_axis_params, extra_variables_retrieve, extra_variables_publish,
          extern_located_variables_declaration, entry_variables,
-         init_entry_variables] = map(lambda l: "\n".join(l), [
+         init_entry_variables] = map("\n".join, [
             fieldbus_interface_declaration, fieldbus_interface_definition,
             init_axis_params, extra_variables_retrieve, extra_variables_publish,
             extern_located_variables_declaration, entry_variables,
--- a/etherlab/EthercatMaster.py	Sat Sep 29 16:19:15 2018 +0300
+++ b/etherlab/EthercatMaster.py	Sat Sep 29 16:23:20 2018 +0300
@@ -711,7 +711,7 @@
     def _Generate_C(self, buildpath, locations):
         current_location = self.GetCurrentLocation()
         # define a unique name for the generated C file
-        location_str = "_".join(map(lambda x: str(x), current_location))
+        location_str = "_".join(map(str, current_location))
 
         Gen_Ethercatfile_path = os.path.join(buildpath, "ethercat_%s.c" % location_str)