Skip to content

Commit d5c0afe

Browse files
Pramesh SharmaPramesh Sharma
authored andcommitted
update formatting standards
1 parent 9ccbc7e commit d5c0afe

File tree

5 files changed

+9
-29
lines changed

5 files changed

+9
-29
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
format:
2-
black --line-length 79 .
2+
black .
33

44
lint:
55
flake8 .

scripts/generate_docs.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ def generate_help(command, filename):
1616

1717
with open(f"docs/commands/{filename}.md", "w") as doc_file:
1818
doc_file.write(f"# SSDraw {command} Command\n\n")
19-
doc_file.write(
20-
f"This section documents the `ssdraw {command}` command.\n\n"
21-
)
19+
doc_file.write(f"This section documents the `ssdraw {command}` command.\n\n")
2220
doc_file.write("```bash\n")
2321
doc_file.write(help_output)
2422
doc_file.write("```\n")

src/SSDraw/cli.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ def get_args(
121121
multi_parser.add_argument(
122122
"-o", "--output", required=True, help="Name of output directory"
123123
)
124-
multi_parser.set_defaults(
125-
func=lambda args: run_multiple_pdbs_on_one_msa(args)
126-
)
124+
multi_parser.set_defaults(func=lambda args: run_multiple_pdbs_on_one_msa(args))
127125

128126
return parser.parse_args(argv)
129127

src/SSDraw/core.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ def read_consurf_grad(input_file: str) -> T.Tuple[str, T.List[int]]:
6767

6868
def check_consurf_file(file: str) -> T.Optional[str]:
6969
consurf_pattern = r"^\s*?\d+\s+(\w)\s+\S+\s+\S+\s+(\d)\S*\s+-?\d+.\d+,\s+-?\d+.\d+\s+\d,\d\s+\d+\/\d+\s+\S+"
70-
r4s_pattern = (
71-
r"^\s*?\d+\s+(\w)\s+(\S+)\s+\[\s*\S+,\s*\S+\]\s+\S+\s+\d+\/\d+"
72-
)
70+
r4s_pattern = r"^\s*?\d+\s+(\w)\s+(\S+)\s+\[\s*\S+,\s*\S+\]\s+\S+\s+\d+\/\d+"
7371
with open(file, "r") as f:
7472
for line in f:
7573
if re.match(consurf_pattern, line):
@@ -970,9 +968,7 @@ def SSDraw(
970968
nlines = 1
971969

972970
# Parse color and scoring args
973-
CMAP, bvals = parse_color(
974-
args, seq_wgaps, pdbseq, bfactors, msa, extra_gaps
975-
)
971+
CMAP, bvals = parse_color(args, seq_wgaps, pdbseq, bfactors, msa, extra_gaps)
976972

977973
mat = np.tile(NormalizeData(bvals), (100, 1))
978974

@@ -1102,11 +1098,7 @@ def SSDraw(
11021098

11031099
ax.set_aspect(0.5)
11041100

1105-
print(
1106-
"Saving output to {:}.{:}...".format(
1107-
args.output, args.output_file_type
1108-
)
1109-
)
1101+
print("Saving output to {:}.{:}...".format(args.output, args.output_file_type))
11101102
plt.savefig(
11111103
args.output + "." + args.output_file_type,
11121104
bbox_inches="tight",

src/SSDraw/multi.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
import SSDraw.core as SSDraw
1616

1717

18-
def SSDraw_layer(
19-
fastas, pdbs, names, output_names, output_dir, additional_params
20-
):
18+
def SSDraw_layer(fastas, pdbs, names, output_names, output_dir, additional_params):
2119
nlines = len(pdbs)
2220

2321
# Plot secondary structure chunks
@@ -171,9 +169,7 @@ def SSDraw_layer(
171169
if loop_coords[j][1][1] > maxsize:
172170
maxsize = loop_coords[j][1][1]
173171

174-
fig, ax = plt.subplots(
175-
ncols=1, figsize=(sz * 0.7, ((maxsize - minsize) * 0.37))
176-
)
172+
fig, ax = plt.subplots(ncols=1, figsize=(sz * 0.7, ((maxsize - minsize) * 0.37)))
177173

178174
for i in range(len(output_names)):
179175
ax.annotate(
@@ -287,9 +283,5 @@ def run_multiple_pdbs_on_one_msa(args):
287283
additional_params,
288284
)
289285

290-
print(
291-
"Creating composite image {:}.{:}".format(
292-
args.output, output_file_type
293-
)
294-
)
286+
print("Creating composite image {:}.{:}".format(args.output, output_file_type))
295287
plt.savefig("{:}.{:}".format(args.output, output_file_type))

0 commit comments

Comments
 (0)