diff cp_common_functions.py @ 6:27edbb90ab2b draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 57a0433defa3cbc37ab34fbb0ebcfaeb680db8d5
author bgruening
date Sun, 05 Nov 2023 09:26:05 +0000
parents 4ecf93628f97
children
line wrap: on
line diff
--- a/cp_common_functions.py	Fri Feb 26 14:09:57 2021 +0000
+++ b/cp_common_functions.py	Sun Nov 05 09:26:05 2023 +0000
@@ -25,7 +25,7 @@
 
 def get_total_number_of_modules(pipeline_lines):
     """Gets the number of modules from the header of the previous pipeline"""
-    number_of_modules = pipeline_lines[LINE_NUM_MODULES].strip().split(':')[1]
+    number_of_modules = pipeline_lines[LINE_NUM_MODULES].strip().split(":")[1]
     return int(number_of_modules)
 
 
@@ -38,7 +38,7 @@
 
 def update_module_count(pipeline_lines, count):
     """Updates the number of modules in the .cppipe header"""
-    module_count_entry = pipeline_lines[LINE_NUM_MODULES].strip().split(':')[0]
+    module_count_entry = pipeline_lines[LINE_NUM_MODULES].strip().split(":")[0]
     pipeline_lines[4] = f"{module_count_entry}:{count}\n"
     return pipeline_lines
 
@@ -51,12 +51,16 @@
 
 def build_header(module_name, module_number):
     """Creates the first line of a module given the name and module number"""
-    result = "|".join([f"{module_name}:[module_num:{module_number}",
-                       "svn_version:\\'Unknown\\'",
-                       "variable_revision_number:4",
-                       "show_window:False",
-                       "notes:\\x5B\\x5D",
-                       "batch_state:array(\\x5B\\x5D, dtype=uint8)",
-                       "enabled:True",
-                       "wants_pause:False]\n"])
+    result = "|".join(
+        [
+            f"{module_name}:[module_num:{module_number}",
+            "svn_version:\\'Unknown\\'",
+            "variable_revision_number:4",
+            "show_window:False",
+            "notes:\\x5B\\x5D",
+            "batch_state:array(\\x5B\\x5D, dtype=uint8)",
+            "enabled:True",
+            "wants_pause:False]\n",
+        ]
+    )
     return result