diff --git a/lib/galaxy/job_execution/actions/post.py b/lib/galaxy/job_execution/actions/post.py
index 8b329b48ce1..47b466110cb 100644
--- a/lib/galaxy/job_execution/actions/post.py
+++ b/lib/galaxy/job_execution/actions/post.py
@@ -333,7 +333,7 @@ class ColumnSetAction(DefaultJobAction):
@classmethod
def get_short_str(cls, pja):
- return f"Set the following metadata values:
{'
'.join('{} : {}'.format(escape(k), escape(v)) for k, v in pja.action_arguments.items())}"
+ return f"Set the following metadata values:
{'
'.join(f'{escape(k)} : {escape(v)}' for k, v in pja.action_arguments.items())}"
class SetMetadataAction(DefaultJobAction):
diff --git a/lib/galaxy/model/dataset_collections/structure.py b/lib/galaxy/model/dataset_collections/structure.py
index 08d1946bda3..159f5ad5562 100644
--- a/lib/galaxy/model/dataset_collections/structure.py
+++ b/lib/galaxy/model/dataset_collections/structure.py
@@ -141,7 +141,7 @@ class Tree(BaseTree):
return Tree(cloned_children, self.collection_type_description)
def __str__(self):
- return f"Tree[collection_type={self.collection_type_description},children={','.join(map(lambda identifier_and_element: '{}={}'.format(identifier_and_element[0], identifier_and_element[1]), self.children))}]"
+ return f"Tree[collection_type={self.collection_type_description},children={','.join(map(lambda identifier_and_element: f'{identifier_and_element[0]}={identifier_and_element[1]}', self.children))}]"
def tool_output_to_structure(get_sliced_input_collection_structure, tool_output, collections_manager):