Skip to content

Commit

Permalink
Convert to f-string
Browse files Browse the repository at this point in the history
  • Loading branch information
cphyc committed Sep 24, 2024
1 parent 3062806 commit af60658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yt/frontends/rockstar/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def __init__(self, ptype, particle_identifier, *, parent_ds, halo_ds):
self.particle_identifier = particle_identifier

def __repr__(self):
return "%s_%s_%09d" % (self.halo_ds, self.ptype, self.particle_identifier)
return f"{self.halo_ds}_{self.ptype}_{self.particle_identifier:09d}"

def __getitem__(self, key):
if isinstance(key, tuple):
Expand Down

0 comments on commit af60658

Please sign in to comment.