Skip to content

Commit

Permalink
Final linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wm75 committed Oct 21, 2024
1 parent e4d25b0 commit d33b4b6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/galaxy/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3980,14 +3980,18 @@ def add_copied_value_to_new_elements(new_label, dce_object):
from_index = int(incoming["how"]["from"]) - 1
to_index = int(incoming["how"]["to"]) - 1
if from_index < 0 or to_index < 0:
raise exceptions.MessageException("Column < 1 specified for relabel mapping file. Column count starts at 1.")
raise exceptions.MessageException(
"Column < 1 specified for relabel mapping file. Column count starts at 1."
)
new_labels_dict = {}
try:
for i, line in enumerate(new_labels, 1): # noqa: B007
cols = line.strip().split("\t")
new_labels_dict[cols[from_index]] = cols[to_index]
except IndexError:
raise exceptions.MessageException(f"Specified column number > number of columns [{len(cols)}] on line {i} of relabel mapping file.")
raise exceptions.MessageException(
f"Specified column number > number of columns [{len(cols)}] on line {i} of relabel mapping file."
)
for dce in hdca.collection.elements:
dce_object = dce.element_object
element_identifier = dce.element_identifier
Expand Down

0 comments on commit d33b4b6

Please sign in to comment.