Skip to content

Commit b8dc79c

Browse files
committed
pyupgrade --py37-plus **/*.py
1 parent cc6570b commit b8dc79c

File tree

6 files changed

+13
-24
lines changed

6 files changed

+13
-24
lines changed

atomate/qchem/firetasks/geo_transformations.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# coding: utf-8
2-
3-
41
# This module defines firetasks for modifying molecular geometries
52

63
import copy

atomate/qchem/firetasks/tests/test_geo_transformations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def setUpClass(cls):
6464
).data["frequency_mode_vectors"][0]
6565

6666
def setUp(self, lpad=False):
67-
super(TestPerturbGeometry, self).setUp(lpad=False)
67+
super().setUp(lpad=False)
6868

6969
def tearDown(self):
7070
pass

atomate/qchem/fireworks/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def __init__(
173173
additional_fields={"task_label": name},
174174
)
175175
)
176-
super(ForceFW, self).__init__(t, parents=parents, name=name, **kwargs)
176+
super().__init__(t, parents=parents, name=name, **kwargs)
177177

178178

179179
class OptimizeFW(Firework):
@@ -318,7 +318,7 @@ def __init__(self,
318318
input_file=input_file,
319319
output_file=output_file,
320320
additional_fields={"task_label": name}))
321-
super(TransitionStateFW, self).__init__(
321+
super().__init__(
322322
t,
323323
parents=parents,
324324
name=name,
@@ -475,7 +475,7 @@ def __init__(self,
475475
input_file=input_file,
476476
output_file=output_file,
477477
additional_fields={"task_label": name}))
478-
super(PESScanFW, self).__init__(
478+
super().__init__(
479479
t,
480480
parents=parents,
481481
name=name,
@@ -725,7 +725,7 @@ def __init__(self,
725725
"linked": linked
726726
}))
727727

728-
super(FrequencyFlatteningTransitionStateFW, self).__init__(
728+
super().__init__(
729729
t,
730730
parents=parents,
731731
name=name,

atomate/qchem/fireworks/tests/test_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def setUp(self, lpad=False):
4848

4949
self.maxDiff = None
5050

51-
super(TestCore, self).setUp(lpad=False)
51+
super().setUp(lpad=False)
5252

5353
def tearDown(self):
5454
pass

atomate/qchem/workflows/base/reaction_path.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
# coding: utf-8
2-
3-
from __future__ import absolute_import, division, print_function, \
4-
unicode_literals
5-
61
# This module defines a workflow for optimizing a transition-state geometry
72
# and then identifying the reaction path
83

@@ -76,7 +71,7 @@ def get_wf_reaction_path_with_ts(molecule,
7671

7772
fw1 = FrequencyFlatteningOptimizeFW(
7873
molecule=molecule,
79-
name="{}:perturb_forwards{}".format(molecule.composition.alphabetical_formula, suffix),
74+
name=f"{molecule.composition.alphabetical_formula}:perturb_forwards{suffix}",
8075
qchem_cmd=qchem_cmd,
8176
max_cores=max_cores,
8277
multimode=multimode,
@@ -89,7 +84,7 @@ def get_wf_reaction_path_with_ts(molecule,
8984

9085
fw2 = FrequencyFlatteningOptimizeFW(
9186
molecule=molecule,
92-
name="{}:perturb_backwards{}".format(molecule.composition.alphabetical_formula, suffix),
87+
name=f"{molecule.composition.alphabetical_formula}:perturb_backwards{suffix}",
9388
qchem_cmd=qchem_cmd,
9489
max_cores=max_cores,
9590
multimode=multimode,
@@ -102,6 +97,6 @@ def get_wf_reaction_path_with_ts(molecule,
10297

10398
fws = [fw1, fw2]
10499

105-
wfname = "{}:{}".format(molecule.composition.alphabetical_formula, name)
100+
wfname = f"{molecule.composition.alphabetical_formula}:{name}"
106101

107102
return Workflow(fws, name=wfname, **kwargs)

atomate/qchem/workflows/tests/test_reaction_path.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# coding: utf-8
2-
3-
41
import os
52
import unittest
63
import copy
@@ -58,10 +55,10 @@ def test_reaction_path_with_ts(self):
5855
)
5956
# use powerup to replace run with fake run
6057
ref_dirs = {
61-
"{}:perturb_forwardsHERE".format(formula): os.path.join(
58+
f"{formula}:perturb_forwardsHERE": os.path.join(
6259
test_double_FF_files, "block", "launcher_forwards"
6360
),
64-
"{}:perturb_backwardsHERE".format(formula): os.path.join(
61+
f"{formula}:perturb_backwardsHERE": os.path.join(
6562
test_double_FF_files, "block", "launcher_backwards"
6663
),
6764
}
@@ -78,12 +75,12 @@ def test_reaction_path_with_ts(self):
7875
self.assertTrue(all([s == "COMPLETED" for s in wf_test.fw_states.values()]))
7976

8077
forwards = self.get_task_collection().find_one(
81-
{"task_label": "{}:perturb_forwardsHERE".format(formula)}
78+
{"task_label": f"{formula}:perturb_forwardsHERE"}
8279
)
8380
forwards_final_mol = Molecule.from_dict(forwards["input"]["initial_molecule"])
8481

8582
backwards = self.get_task_collection().find_one(
86-
{"task_label": "{}:perturb_backwardsHERE".format(formula)}
83+
{"task_label": f"{formula}:perturb_backwardsHERE"}
8784
)
8885
backwards_final_mol = Molecule.from_dict(backwards["input"]["initial_molecule"])
8986

0 commit comments

Comments
 (0)