Skip to content

Commit

Permalink
fix ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
kenko911 committed May 6, 2024
1 parent e035d1c commit cc80907
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/matgl/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def relax_structure(args):
print("Sites (Fractional coordinates)")

def fmt_fcoords(fc):
return np.array2string(fc, formatter={"float_kind": lambda x: "%.5f" % x})
return np.array2string(fc, formatter={"float_kind": lambda x: f"{x:.5f}"})

for old_site, new_site in zip(structure, final_structure):
print(f"{old_site.species}: {fmt_fcoords(old_site.frac_coords)} -> {fmt_fcoords(new_site.frac_coords)}")
Expand Down

0 comments on commit cc80907

Please sign in to comment.