Skip to content

Commit af60658

Browse files
committed
Convert to f-string
1 parent 3062806 commit af60658

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

yt/frontends/rockstar/data_structures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def __init__(self, ptype, particle_identifier, *, parent_ds, halo_ds):
193193
self.particle_identifier = particle_identifier
194194

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

198198
def __getitem__(self, key):
199199
if isinstance(key, tuple):

0 commit comments

Comments
 (0)