Skip to content

Commit

Permalink
Refactor using maxsplit
Browse files Browse the repository at this point in the history
  • Loading branch information
Redmar-van-den-Berg committed Apr 3, 2024
1 parent 305a724 commit 2003681
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bin/fuma-gencode-gtf-to-bed
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ def attribute_to_dict(line):
if not entry:
continue
# value can contain spaces
key, *value = entry.split()
# Put spaces back into value
value = ' '.join(value)
key, value = entry.split(maxsplit=1)
# value can contain quotes
data[key] = value.replace('"','')
return data

Expand Down

0 comments on commit 2003681

Please sign in to comment.