Skip to content

Commit

Permalink
fixed f-string for older python
Browse files Browse the repository at this point in the history
  • Loading branch information
charnley committed Jan 9, 2025
1 parent 303d1a2 commit b760b29
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions rmsd/calculate_rmsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,9 @@ def set_coordinates(
atom = atoms[i]
out += [fmt.format(atom, V[i, 0], V[i, 1], V[i, 2])]

return "\n".join(out)
newline = "\n"

return newline.join(out)


def get_coordinates(
Expand Down Expand Up @@ -1878,6 +1880,8 @@ def parse_arguments(arguments: Optional[Union[str, List[str]]] = None) -> argpar
"""

sep = ", "

parser = argparse.ArgumentParser(
usage="calculate_rmsd [options] FILE_A FILE_B",
description=__intro__,
Expand All @@ -1904,7 +1908,7 @@ def parse_arguments(arguments: Optional[Union[str, List[str]]] = None) -> argpar
action="store",
default="kabsch",
help=(
f"Select rotation method. Valid methods are: {", ".join(ROTATION_METHODS)}. Default is `Kabsch`."
f"Select rotation method. Valid methods are: {sep.join(ROTATION_METHODS)}. Default is `Kabsch`."
),
metavar="METHOD",
choices=ROTATION_METHODS,
Expand All @@ -1925,7 +1929,7 @@ def parse_arguments(arguments: Optional[Union[str, List[str]]] = None) -> argpar
metavar="METHOD",
help=(
"Select reorder method. Valid method are "
f"{', '.join(REORDER_METHODS)}. "
f"{sep.join(REORDER_METHODS)}. "
"Default is Inertia-Hungarian."
),
choices=REORDER_METHODS,
Expand Down Expand Up @@ -1986,7 +1990,7 @@ def parse_arguments(arguments: Optional[Union[str, List[str]]] = None) -> argpar
parser.add_argument(
"--format",
action="store",
help=f"Format of input files. valid format are {', '.join(FORMATS)}.",
help=f"Format of input files. valid format are {sep.join(FORMATS)}.",
metavar="FMT",
)
parser.add_argument(
Expand Down

0 comments on commit b760b29

Please sign in to comment.