Skip to content

Commit 02e83cd

Browse files
committed
Improved PEP8 conformance.
1 parent aeb6fb2 commit 02e83cd

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

structure_threader.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121
import signal
2222
import subprocess
2323
import itertools
24-
import plotter.structplot as sp
25-
import sanity_checks.sanity as sanity
24+
2625
from multiprocessing import Pool
2726
from random import randrange
2827

28+
import plotter.structplot as sp
29+
import sanity_checks.sanity as sanity
2930

3031
def gracious_exit(*args):
3132
"""Graciously exit the program."""
@@ -50,7 +51,7 @@ def runprogram(iterations):
5051
if wrapped_prog == "structure":
5152
# Keeps correct directory separator across OS's
5253
output_file = os.path.join(outpath, "K" + str(K) + "_rep" +
53-
str(rep_num))
54+
str(rep_num))
5455
cli = [arg.structure_bin, "-K", str(K), "-i", infile, "-o", output_file]
5556
else:
5657
# Keeps correct directory separator across OS's
@@ -62,7 +63,8 @@ def runprogram(iterations):
6263
if err.errno != 17:
6364
raise
6465

65-
cli = ["python2", arg.faststructure_bin, "-K", str(K), "--input", infile, "--output", output_file, "--format=str"]
66+
cli = ["python2", arg.faststructure_bin, "-K", str(K), "--input",
67+
infile, "--output", output_file, "--format=str"]
6668

6769
print("Running: " + " ".join(cli))
6870
program = subprocess.Popen(cli, bufsize=64, shell=False,
@@ -161,7 +163,7 @@ def create_plts(resultsdir):
161163
"paralelize the runs of the "
162164
"Structure software.",
163165
prog="Structure_threader",
164-
formatter_class=argparse.RawTextHelpFormatter)
166+
formatter_class=argparse.RawTextHelpFormatter)
165167

166168
io_opts = parser.add_argument_group("Input/Output options")
167169
main_exec = parser.add_argument_group("Program execution options")
@@ -171,15 +173,15 @@ def create_plts(resultsdir):
171173
main_exec_ex = main_exec.add_mutually_exclusive_group(required=True)
172174

173175
main_exec_ex.add_argument("-st", dest="structure_bin", type=str,
174-
default=None,
175-
metavar="filepath",
176-
help="Location of the structure executable in your "
177-
"environment.")
176+
default=None,
177+
metavar="filepath",
178+
help="Location of the structure executable in "
179+
" your environment.")
178180
main_exec_ex.add_argument("-fs", dest="faststructure_bin", type=str,
179-
default=None,
180-
metavar="filepath",
181-
help="Location of the fastStructure executable "
182-
"(structure.py) in your environment.")
181+
default=None,
182+
metavar="filepath",
183+
help="Location of the fastStructure executable "
184+
"(structure.py) in your environment.")
183185

184186
run_opts.add_argument("-K", dest="Ks", type=int, required=True,
185187
help="Number of Ks to run.\n", metavar="int")

0 commit comments

Comments
 (0)