Skip to content

Commit

Permalink
Apply ruff formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ndaelman committed Jan 16, 2025
1 parent 01b1cba commit 0f1141b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion electronicparsers/quantumespresso/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3496,7 +3496,12 @@ def parse_method(self, run):

if (n_electrons := run.get_header('number_of_electrons')) is not None:
sec_method.electronic.n_electrons = n_electrons
elif len(n_spin_electrons := list(run.get_header('number_of_spin_electrons', []))) == 2:
elif (
len(
n_spin_electrons := list(run.get_header('number_of_spin_electrons', []))
)
== 2
):
sec_method.electronic.n_electrons = sum(n_spin_electrons)

def init_parser(self):
Expand Down

0 comments on commit 0f1141b

Please sign in to comment.