Skip to content

Commit 382f280

Browse files
[pre-commit.ci] auto fixes from pre-commit hooks
1 parent 8bff572 commit 382f280

30 files changed

Lines changed: 48 additions & 76 deletions

src/diffpy/morph/morph_helpers/transformpdftordf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
##############################################################################
1515
"""Class TransformXtalPDFtoRDF -- Transform crystal PDFs to RDFs."""
1616

17-
1817
from diffpy.morph.morphs.morph import LABEL_GR, LABEL_RA, LABEL_RR, Morph
1918

2019

src/diffpy/morph/morph_helpers/transformrdftopdf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
##############################################################################
1515
"""Class TransformXtalRDFtoPDF -- Transform crystal RDFs to PDFs."""
1616

17-
1817
import numpy
1918

2019
from diffpy.morph.morphs.morph import LABEL_GR, LABEL_RA, LABEL_RR, Morph

src/diffpy/morph/morph_io.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ def single_morph_output(
155155
stdout_flag: bool
156156
Print to terminal when True (default False).
157157
"""
158-
159158
# Input and output parameters
160159
morphs_in = "\n# Input morphing parameters:\n"
161160
morphs_in += (
@@ -302,7 +301,6 @@ def get_multisave_names(target_list: list, save_names_file=None, mm=False):
302301
The names to save each morph as. Keys are the target function file
303302
names used to produce that morph.
304303
"""
305-
306304
# Dictionary storing save file names
307305
save_names = {}
308306

@@ -382,7 +380,6 @@ def multiple_morph_output(
382380
Multiple morphs done with a single target rather than multiple
383381
targets for a single morphed file. Swaps morph and target in the code.
384382
"""
385-
386383
# Input parameters used for every morph
387384
inputs = "\n# Input morphing parameters:\n"
388385
inputs += "\n".join(
@@ -480,7 +477,6 @@ def tabulate_results(multiple_morph_results):
480477
Keys in tabulated_results are the table's column names and each
481478
corresponding value is a list of data for that column.
482479
"""
483-
484480
# We only care about the following parameters in our data tables
485481
relevant_parameters = ["Scale", "Smear", "Stretch", "Pearson", "Rw"]
486482

src/diffpy/morph/morphapp.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def morph_error(self, msg, error):
242242
help=(
243243
"Slope of the baseline. "
244244
"For a bulk material with scale factor 1, "
245-
"this will have value -4\u03C0 times the atomic density. "
245+
"this will have value -4\u03c0 times the atomic density. "
246246
"Otherwise, you can estimate it by dividing the y "
247247
"position from the x position "
248248
"of the base of the first peak. "
@@ -334,7 +334,8 @@ def morph_error(self, msg, error):
334334
"--noplot",
335335
action="store_false",
336336
dest="plot",
337-
help="""Do not show a plot.""",
337+
help="""Do not show a plot."""
338+
,
338339
)
339340
group.add_option(
340341
"--mlabel",
@@ -446,7 +447,9 @@ def morph_error(self, msg, error):
446447
"--reverse",
447448
dest="reverse",
448449
action="store_true",
449-
help="""Sort from highest to lowest instead.""",
450+
help=\
451+
"""Sort from highest to lowest instead."""
452+
,
450453
)
451454
group.add_option(
452455
"--serial-file",
@@ -1278,7 +1281,7 @@ def getPDFFromFile(fn):
12781281

12791282
def main():
12801283
parser = create_option_parser()
1281-
(opts, pargs) = parser.parse_args()
1284+
opts, pargs = parser.parse_args()
12821285
if opts.multiple_targets:
12831286
multiple_targets(parser, opts, pargs, stdout_flag=True)
12841287
elif opts.multiple_morphs:

src/diffpy/morph/morphpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def get_args(parser, params, kwargs):
2222
else:
2323
inputs.append(f"--{key}")
2424
inputs.append(f"{value}")
25-
(opts, pargs) = parser.parse_args(inputs)
25+
opts, pargs = parser.parse_args(inputs)
2626
return opts, pargs
2727

2828

src/diffpy/morph/morphs/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
##############################################################################
1515
"""Definition of morphs."""
1616

17-
1817
from diffpy.morph.morphs.morph import Morph # noqa: F401
1918
from diffpy.morph.morphs.morphchain import MorphChain # noqa: F401
2019
from diffpy.morph.morphs.morphfuncx import MorphFuncx

src/diffpy/morph/morphs/morph.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#
1414
##############################################################################
1515
"""Morph -- base class for defining a morph."""
16+
1617
import numpy
1718

1819
LABEL_RA = "r (A)" # r-grid
@@ -189,9 +190,10 @@ def applyConfig(self, config):
189190
return
190191

191192
def checkConfig(self):
192-
"""Verify data in self.config. No action by default.
193+
"""Verify data in self.config.
193194
194-
To be overridden in a derived class.
195+
No action by default. To be overridden in a derived
196+
class.
195197
"""
196198
return
197199

@@ -257,7 +259,6 @@ def set_extrapolation_info(self, x_true, x_extrapolate):
257259
x_extrapolate : array
258260
x values after a morphing process
259261
"""
260-
261262
cutoff_low = min(x_true)
262263
extrap_low_x = numpy.where(x_extrapolate < cutoff_low)[0]
263264
is_extrap_low = False if len(extrap_low_x) == 0 else True

src/diffpy/morph/morphs/morphchain.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
# See LICENSE.txt for license information.
1313
#
1414
##############################################################################
15-
"""MorphChain -- Chain of morphs executed in order.
16-
"""
17-
15+
"""MorphChain -- Chain of morphs executed in order."""
1816

1917
class MorphChain(list):
2018
"""Class for chaining morphs together.

src/diffpy/morph/morphs/morphishape.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"""Class MorphISphere -- apply inverse spherical shape function class
1616
MorphISpheroid -- apply inverse spheroidal shape function."""
1717

18-
1918
import numpy
2019

2120
from diffpy.morph.morphs.morph import LABEL_GR, LABEL_RA, Morph

src/diffpy/morph/morphs/morphresolution.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"""Class MorphResolutionDamping -- apply resolution broadening to the
1616
morph."""
1717

18-
1918
import numpy
2019

2120
from diffpy.morph.morphs.morph import LABEL_RA, LABEL_RR, Morph

0 commit comments

Comments
 (0)