From d34bb96d2edfc2832c81083cc9bdca1c7c6432d1 Mon Sep 17 00:00:00 2001 From: Shyue Ping Ong Date: Tue, 22 Mar 2022 12:03:39 -0700 Subject: [PATCH] More cleanup. --- pymatgen/core/structure.py | 5 +++-- pymatgen/electronic_structure/boltztrap.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pymatgen/core/structure.py b/pymatgen/core/structure.py index 61913f33c0a..cce171c8080 100644 --- a/pymatgen/core/structure.py +++ b/pymatgen/core/structure.py @@ -2063,8 +2063,9 @@ def factors(n): if all(getattr(p_latt, pp) == getattr(s_latt, pp) for pp in constrain_latt): return p elif type(constrain_latt).__name__ == "dict": - if all(getattr(p_latt, pp) == constrain_latt[pp] - for pp in constrain_latt.keys()): # type: ignore + if all( + getattr(p_latt, pp) == constrain_latt[pp] for pp in constrain_latt.keys() # type: ignore + ): return p return self.copy() diff --git a/pymatgen/electronic_structure/boltztrap.py b/pymatgen/electronic_structure/boltztrap.py index e6168b2ec46..ed5ebc2a848 100644 --- a/pymatgen/electronic_structure/boltztrap.py +++ b/pymatgen/electronic_structure/boltztrap.py @@ -476,7 +476,8 @@ def write_intrans(self, output_file): with open(output_file, "w") as fout: fout.write("GENE # use generic interface\n") fout.write( - f"1 0 {setgap} {Energy(self.scissor, 'eV').to('Ry')} # iskip (not presently used) idebug setgap shiftgap \n" + f"1 0 {setgap} {Energy(self.scissor, 'eV').to('Ry')} " + "# iskip (not presently used) idebug setgap shiftgap \n" ) fout.write( "0.0 %f %f %6.1f # Fermilevel (Ry),energygrid,energy "