Skip to content

Commit 3fe3628

Browse files
committed
tighten behavior
1 parent 862a85b commit 3fe3628

File tree

1 file changed

+2
-1
lines changed
  • src/nomad_simulation_parsers/parsers/quantumespresso

1 file changed

+2
-1
lines changed

src/nomad_simulation_parsers/parsers/quantumespresso/parser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ def get_energy_contributions(self, source: dict[str, Any]):
140140
]
141141

142142
def get_xc_functionals(self, source: str) -> list[dict[str, Any]]:
143-
numbers = source.split('(', maxsplit=1)[1].split(')', maxsplit=1)[0]
143+
# Keep legacy behavior for additional '(' while satisfying PLC0207.
144+
numbers = source.split('(', maxsplit=2)[1].split(')', maxsplit=1)[0]
144145
nval = (4, 10)
145146
# handle different formatting
146147
if len(numbers) == nval[0]:

0 commit comments

Comments
 (0)