Skip to content

Commit

Permalink
Apply f-string
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Cech <[email protected]>
  • Loading branch information
astrovsky01 and martenson authored Feb 25, 2024
1 parent eb6fff5 commit 97f8782
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/datatypes/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -4566,7 +4566,7 @@ class Numpy(Binary):

def _numpy_version_string(self, filename):
magic_string = open(filename, "rb").read(8)
version_str = str(magic_string[6]) + "." + str(magic_string[7])
version_str = f"{magic_string[6]}.{magic_string[7]}"
return version_str

def set_meta(self, dataset: DatasetProtocol, overwrite: bool = True, **kwd) -> None:
Expand All @@ -4582,7 +4582,7 @@ def sniff_prefix(self, file_prefix: FilePrefix) -> bool:

def set_peek(self, dataset: DatasetProtocol, **kwd) -> None:
if not dataset.dataset.purged:
dataset.peek = "Binary numpy file version %s" % dataset.metadata.version_str
dataset.peek = f"Binary numpy file version {dataset.metadata.version_str}"
dataset.blurb = nice_size(dataset.get_size())
else:
dataset.peek = "file does not exist"
Expand Down

0 comments on commit 97f8782

Please sign in to comment.