Skip to content

Commit

Permalink
Update parse.py
Browse files Browse the repository at this point in the history
Try to pass Black test
  • Loading branch information
chuntian236 authored and matthewcarbone committed Jan 3, 2024
1 parent 030f9eb commit f9241c6
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions lightshow/postprocess/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,11 @@ def extract_XSpectra(path, es_out_file=None):
# Raise error if there is no ``xanes.dat`` file in the directory.

if num_polar > 3:
warnings.warn("More than three 'xanes.dat' files in %s. \
Might be a problem." % path)
warnings.warn(
"More than three 'xanes.dat' files in %s. \
Might be a problem."
% path
)
# Print a reminder if more than three polarizations in the directory.

dict_output["spectrum"] = spectra / num_polar
Expand Down Expand Up @@ -222,9 +225,9 @@ def extract_OCEAN(path, scf_out_file=None):
if "!" in line:
total_energy = (
float(line.split()[-2])
* physical_constants[
"Rydberg constant times hc in eV"
][0]
* physical_constants["Rydberg constant times hc in eV"][
0
]
)
# Try to extract Fermi energy from ``scf.out`` file.

Expand Down Expand Up @@ -329,8 +332,11 @@ def extract_exciting(path, INFO_out_file=None):
# Raise error if there is no ``EPSILON...OUT`` file in the directory.

if num_polar > 3:
warnings.warn("More than three 'EPSILON...OUT' files in %s. \
Might be a problem." % path)
warnings.warn(
"More than three 'EPSILON...OUT' files in %s. \
Might be a problem."
% path
)
# Print a reminder if more than three polarizations in the directory.

dict_output["spectrum"] = spectra / num_polar
Expand Down

0 comments on commit f9241c6

Please sign in to comment.