Skip to content

Commit a14e37d

Browse files
committed
pyupgrade --py37-plus **/*.py + black
1 parent 43a347a commit a14e37d

33 files changed

+114
-134
lines changed

atomate/common/firetasks/parse_outputs.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ def run_task(self, fw_spec):
5353

5454
# parse the calc directory
5555
logger.info(
56-
"PARSING DIRECTORY: {} USING DRONE: {}".format(
57-
calc_dir, self["drone"].__class__.__name__
58-
)
56+
f"PARSING DIRECTORY: {calc_dir} USING DRONE: {self['drone'].__class__.__name__}".
5957
)
6058
# get the database connection
6159
db_file = env_chk(self.get("db_file"), fw_spec)

atomate/feff/firetasks/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
from .glue_tasks import *
32
from .parse_outputs import *
43
from .run_calc import *

atomate/feff/fireworks/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
21
from .core import *

atomate/feff/fireworks/core.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(
3333
db_file=None,
3434
parents=None,
3535
metadata=None,
36-
**kwargs
36+
**kwargs,
3737
):
3838
"""
3939
Write the input set for FEFF-XAS spectroscopy, run FEFF and insert the absorption
@@ -63,7 +63,7 @@ def __init__(
6363
structure,
6464
edge=edge,
6565
radius=radius,
66-
**override_default_feff_params
66+
**override_default_feff_params,
6767
)
6868
spectrum_type = feff_input_set.__class__.__name__[2:-3]
6969

@@ -90,8 +90,8 @@ def __init__(
9090
super().__init__(
9191
t,
9292
parents=parents,
93-
name="{}-{}".format(structure.composition.reduced_formula, name),
94-
**kwargs
93+
name=f"{structure.composition.reduced_formula}-{name}",
94+
**kwargs,
9595
)
9696

9797

@@ -114,7 +114,7 @@ def __init__(
114114
db_file=None,
115115
parents=None,
116116
metadata=None,
117-
**kwargs
117+
**kwargs,
118118
):
119119
"""
120120
Write the input set for FEFF-EELSS spectroscopy, run feff and insert the core-loss spectrum
@@ -154,7 +154,7 @@ def __init__(
154154
collection_angle,
155155
convergence_angle,
156156
user_eels_settings=user_eels_settings,
157-
**override_default_feff_params
157+
**override_default_feff_params,
158158
)
159159
spectrum_type = feff_input_set.__class__.__name__[2:-3]
160160

@@ -181,8 +181,8 @@ def __init__(
181181
super().__init__(
182182
t,
183183
parents=parents,
184-
name="{}-{}".format(structure.composition.reduced_formula, name),
185-
**kwargs
184+
name=f"{structure.composition.reduced_formula}-{name}",
185+
**kwargs,
186186
)
187187

188188

@@ -203,7 +203,7 @@ def __init__(
203203
filepad_file=None,
204204
labels=None,
205205
metadata=None,
206-
**kwargs
206+
**kwargs,
207207
):
208208
"""
209209
Write the input set for FEFF-EXAFS spectroscopy with customized scattering paths, run feff,
@@ -237,7 +237,7 @@ def __init__(
237237
structure,
238238
edge=edge,
239239
radius=radius,
240-
**override_default_feff_params
240+
**override_default_feff_params,
241241
)
242242

243243
t = [
@@ -260,6 +260,6 @@ def __init__(
260260
super().__init__(
261261
t,
262262
parents=parents,
263-
name="{}-{}".format(structure.composition.reduced_formula, name),
264-
**kwargs
263+
name=f"{structure.composition.reduced_formula}-{name}",
264+
**kwargs,
265265
)

atomate/feff/workflows/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
21
from .core import *
32
from .presets import *

atomate/feff/workflows/tests/test_exafs_scattering_paths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def setUp(self):
3030
def test_wflow_composition(self):
3131
self.assertEqual(len(self.wf_dict["fws"]), 2)
3232
ans = sorted(["FeO-EXAFS-K-0", "FeO-EXAFS Paths"])
33-
self.assertEqual(ans, sorted([ft["name"] for ft in self.wf_dict["fws"]]))
33+
self.assertEqual(ans, sorted(ft["name"] for ft in self.wf_dict["fws"]))
3434

3535
def test_feff_input_sets(self):
3636
ans_fis_fw1 = {
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
21
# from .write_inputs import *
32
# from .run_calc import *
43
# from .parse_outputs import *
54
# from .glue_tasks import *
6-
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
21
# from .core import *
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
21
# from .core import *

atomate/qchem/firetasks/run_calc.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ def run_task(self, fw_spec):
4747

4848
logger.info(f"Running command: {cmd}")
4949
return_code = subprocess.call(cmd, shell=True)
50-
logger.info(
51-
"Command {} finished running with return code: {}".format(cmd, return_code)
52-
)
50+
logger.info(f"Command {cmd} finished running with return code: {return_code}")
5351

5452

5553
@explicit_serialize

0 commit comments

Comments
 (0)