Skip to content

Commit c90f139

Browse files
[pre-commit.ci] auto fixes from pre-commit hooks
1 parent 82221f4 commit c90f139

File tree

2 files changed

+41
-42
lines changed

2 files changed

+41
-42
lines changed

Diff for: src/diffpy/morph/morphapp.py

+4-12
Original file line numberDiff line numberDiff line change
@@ -786,13 +786,9 @@ def multiple_targets(parser, opts, pargs, stdout_flag=True, python_wrap=False):
786786
else:
787787
try:
788788
if field_list is not None:
789-
plot.plot_param(
790-
field_list, param_list, param_name, field
791-
)
789+
plot.plot_param(field_list, param_list, param_name, field)
792790
else:
793-
plot.plot_param(
794-
target_file_names, param_list, param_name
795-
)
791+
plot.plot_param(target_file_names, param_list, param_name)
796792
# Can occur for non-refined plotting parameters
797793
# i.e. --smear is not selected as an option, but smear is the
798794
# plotting parameter
@@ -975,13 +971,9 @@ def multiple_morphs(parser, opts, pargs, stdout_flag=True, python_wrap=False):
975971
else:
976972
try:
977973
if field_list is not None:
978-
plot.plot_param(
979-
field_list, param_list, param_name, field
980-
)
974+
plot.plot_param(field_list, param_list, param_name, field)
981975
else:
982-
plot.plot_param(
983-
morph_file_names, param_list, param_name
984-
)
976+
plot.plot_param(morph_file_names, param_list, param_name)
985977
# Can occur for non-refined plotting parameters
986978
# i.e. --smear is not selected as an option, but smear is the
987979
# plotting parameter

Diff for: src/diffpy/morph/morphpy.py

+37-30
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
from pathlib import Path
44

5-
from diffpy.morph.morphapp import create_option_parser, single_morph, multiple_targets, multiple_morphs
5+
from diffpy.morph.morphapp import (
6+
create_option_parser,
7+
multiple_morphs,
8+
multiple_targets,
9+
single_morph,
10+
)
611

712

813
def morph(file1, file2, **kwargs):
@@ -32,26 +37,28 @@ def morph(file1, file2, **kwargs):
3237
(opts, pargs) = parser.parse_args(inputs)
3338
pargs = [file1, file2]
3439

35-
return single_morph(parser, opts, pargs, stdout_flag=False, python_wrap=True)
40+
return single_morph(
41+
parser, opts, pargs, stdout_flag=False, python_wrap=True
42+
)
3643

3744

3845
def morph_multiple_targets(file, dir, **kwargs):
3946
"""Run diffpy.morph with multiple targets at Python level.
4047
41-
Parameters
42-
----------
43-
file1: str
44-
Path-like object to the file to be morphed.
45-
file2: str
46-
Path-like object to the target file.
47-
kwargs: dict
48-
See the diffpy.morph manual for options.
49-
50-
Returns
51-
-------
52-
dict:
53-
Summary of morphs.
54-
"""
48+
Parameters
49+
----------
50+
file1: str
51+
Path-like object to the file to be morphed.
52+
file2: str
53+
Path-like object to the target file.
54+
kwargs: dict
55+
See the diffpy.morph manual for options.
56+
57+
Returns
58+
-------
59+
dict:
60+
Summary of morphs.
61+
"""
5562

5663
parser = create_option_parser()
5764

@@ -68,20 +75,20 @@ def morph_multiple_targets(file, dir, **kwargs):
6875
def morph_multiple_morphs(dir, file, **kwargs):
6976
"""Run diffpy.morph with multiple files morphed at Python level.
7077
71-
Parameters
72-
----------
73-
file1: str
74-
Path-like object to the file to be morphed.
75-
file2: str
76-
Path-like object to the target file.
77-
kwargs: dict
78-
See the diffpy.morph manual for options.
79-
80-
Returns
81-
-------
82-
dict:
83-
Summary of morphs.
84-
"""
78+
Parameters
79+
----------
80+
file1: str
81+
Path-like object to the file to be morphed.
82+
file2: str
83+
Path-like object to the target file.
84+
kwargs: dict
85+
See the diffpy.morph manual for options.
86+
87+
Returns
88+
-------
89+
dict:
90+
Summary of morphs.
91+
"""
8592

8693
parser = create_option_parser()
8794

0 commit comments

Comments
 (0)