More f-strings for ruff

This commit is contained in:
mvdbeek
2023-01-21 12:26:10 +01:00
parent d09bd93502
commit a79c3619f0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -333,7 +333,7 @@ class ColumnSetAction(DefaultJobAction):
@classmethod
def get_short_str(cls, pja):
return f"Set the following metadata values:<br/>{'<br/>'.join('{} : {}'.format(escape(k), escape(v)) for k, v in pja.action_arguments.items())}"
return f"Set the following metadata values:<br/>{'<br/>'.join(f'{escape(k)} : {escape(v)}' for k, v in pja.action_arguments.items())}"
class SetMetadataAction(DefaultJobAction):
@@ -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):