Skip to content

Commit

Permalink
Apply ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
ndaelman committed Dec 16, 2024
1 parent b31578d commit 417a9b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 10 additions & 8 deletions electronicparsers/wien2k/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,18 +1127,20 @@ def parse_method(self):
atom_obj = AtomParameters()
atom_obj.atom_index = atom_index
atom_obj.core_hole = CoreHole(
j_quantum_number = j_quantum_number,
l_quantum_number = l_quantum_number,
n_quantum_number = n_quantum_number,
n_electrons_excited = electrons_excited,
occupation = occupancy,
dscf_state = 'final',
j_quantum_number=j_quantum_number,
l_quantum_number=l_quantum_number,
n_quantum_number=n_quantum_number,
n_electrons_excited=electrons_excited,
occupation=occupancy,
dscf_state='final',
)
atom_par.append(atom_obj)
break
else:
self.logger.warning("inc file is missing, no corehole information "
"will be parsed if corehole present.")
self.logger.warning(
'inc file is missing, no corehole information '
'will be parsed if corehole present.'
)
# basis
if self.in1_parser.mainfile:
self.in1_parser.parse()
Expand Down
2 changes: 2 additions & 0 deletions tests/test_wien2kparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
CoreHole,
)


def approx(value, abs=0, rel=1e-6):
return pytest.approx(value, abs=abs, rel=rel)

Expand Down Expand Up @@ -125,6 +126,7 @@ def test_dos(parser, caplog):
2.7395685667470246e17
)


def test_core_hole(parser, caplog):
archive = EntryArchive()
parser.parse('tests/data/wien2k/TiN-corehole/TiN-corehole.scf', archive, None)
Expand Down

0 comments on commit 417a9b2

Please sign in to comment.