Skip to content

Commit

Permalink
missed some
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Jan 6, 2023
1 parent f594e00 commit d354b6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pymatgen/core/xcfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def type(self):
# If self is not in defined_aliases, use LibxcFunc family
if self.xc is not None:
return self.xc.family
return "+".join(self.x.family, self.c.family)
return f"{self.x.family}+{self.c.family}"

@lazy_property
def name(self) -> str:
Expand Down
6 changes: 3 additions & 3 deletions pymatgen/io/feff/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,15 +546,15 @@ def __str__(self):
String representation of Atoms file.
"""
lines_sorted = self.get_lines()
# TODO: remove the formatting and update the unittests
# TODO: remove the formatting and update the unit tests
lines_formatted = str(
tabulate(
lines_sorted,
headers=["* x", "y", "z", "ipot", "Atom", "Distance", "Number"],
)
)
atom_list = lines_formatted.replace("--", "**")
return "".join("ATOMS\n", atom_list, "\nEND\n")
return f"ATOMS\n{atom_list}\nEND\n"

def write_file(self, filename="ATOMS"):
"""
Expand All @@ -564,7 +564,7 @@ def write_file(self, filename="ATOMS"):
filename: path for file to be written
"""
with zopen(filename, "wt") as f:
f.write(str(self) + "\n")
f.write(f"{self}\n")


class Tags(dict):
Expand Down

0 comments on commit d354b6d

Please sign in to comment.