Skip to content

Commit 36216d8

Browse files
[pre-commit.ci] auto fixes from pre-commit hooks
1 parent 8729487 commit 36216d8

34 files changed

Lines changed: 128 additions & 74 deletions

docs/examples/debyemodel.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
# See LICENSE_DANSE.txt for license information.
1313
#
1414
########################################################################
15-
"""Example of fitting the Debye model to experimental Debye-Waller factors.
15+
"""Example of fitting the Debye model to experimental Debye-Waller
16+
factors.
1617
1718
In this example, we build a fit recipe that uses an external function that can
1819
simulate a atomic displacement parameters using the Debye model. This serves as
@@ -207,7 +208,8 @@ def main():
207208

208209

209210
def debye(T, m, thetaD):
210-
"""A wrapped version of 'adps' that can handle an array of T-values."""
211+
"""A wrapped version of 'adps' that can handle an array of
212+
T-values."""
211213
y = numpy.array([adps(m, thetaD, x) for x in T])
212214
return y
213215

docs/examples/debyemodelII.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
# See LICENSE_DANSE.txt for license information.
1313
#
1414
########################################################################
15-
"""Example of fitting the Debye recipe to experimental Debye-Waller factors.
15+
"""Example of fitting the Debye recipe to experimental Debye-Waller
16+
factors.
1617
1718
This is an extension of example in debyemodel.py. The recipe we create will
1819
simultaneously fit the low and high temperature parts of the experimental data

docs/examples/npintensityII.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
# See LICENSE_DANSE.txt for license information.
1313
#
1414
########################################################################
15-
"""Example of extracting information from multiple data sets simultaneously.
15+
"""Example of extracting information from multiple data sets
16+
simultaneously.
1617
1718
This example builds on npintensitygenerator.py, and uses IntensityGenerator
1819
from that example to build a recipe that simultaneously refines two data sets

docs/examples/nppdfsas.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838

3939

4040
def makeRecipe(ciffile, grdata, iqdata):
41-
"""Make complex-modeling recipe where I(q) and G(r) are fit simultaneously.
41+
"""Make complex-modeling recipe where I(q) and G(r) are fit
42+
simultaneously.
4243
4344
The fit I(q) is fed into the calculation of G(r), which provides
4445
feedback for the fit parameters of both.

docs/examples/threedoublepeaks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030

3131

3232
def makeRecipe():
33-
"""Make a FitRecipe for fitting three double-gaussian curves to data.
33+
"""Make a FitRecipe for fitting three double-gaussian curves to
34+
data.
3435
3536
The separation and amplitude ratio of the double peaks follows a
3637
specific relationship. The peaks are broadend according to their

src/diffpy/srfit/equation/builder.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ def registerFunction(self, name, func, argnames):
238238
return self.registerBuilder(name, opbuilder)
239239

240240
def registerBuilder(self, name, builder):
241-
"""Register builder in this module so it can be used in makeEquation.
241+
"""Register builder in this module so it can be used in
242+
makeEquation.
242243
243244
If an extant builder with the given name is already registered,
244245
this will replace all instances of the old builder's literal in
@@ -282,7 +283,8 @@ def deRegisterBuilder(self, name):
282283
return
283284

284285
def wipeout(self, eq):
285-
"""Invalidate the specified equation and remove it from the factory.
286+
"""Invalidate the specified equation and remove it from the
287+
factory.
286288
287289
This will remove the equation from the purview of the factory
288290
and also change its formula to return NaN. This ensures that eq
@@ -576,7 +578,8 @@ class ArgumentBuilder(BaseBuilder):
576578
"""
577579

578580
def __init__(self, value=None, name=None, const=False, arg=None):
579-
"""Create an ArgumentBuilder instance, containing a new Argument.
581+
"""Create an ArgumentBuilder instance, containing a new
582+
Argument.
580583
581584
Parameters
582585
----------
@@ -732,8 +735,8 @@ def getBuilder(name):
732735

733736

734737
def __wrap_numpy_operators():
735-
"""Export all numpy operators as OperatorBuilder instances in the module
736-
namespace."""
738+
"""Export all numpy operators as OperatorBuilder instances in the
739+
module namespace."""
737740
for name in dir(numpy):
738741
op = getattr(numpy, name)
739742
if isinstance(op, numpy.ufunc):

src/diffpy/srfit/equation/literals/literal.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626

2727

2828
class Literal(Observable, LiteralABC):
29-
"""Abstract class for equation pieces, such as operators and arguments.
29+
"""Abstract class for equation pieces, such as operators and
30+
arguments.
3031
3132
Literal derives from Observable. See diffpy.srfit.util.observable.
3233

src/diffpy/srfit/equation/literals/operators.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ def _loop_check(self, literal):
141141

142142

143143
class UnaryOperator(Operator):
144-
"""Abstract class for an unary operator with one input and one result.
144+
"""Abstract class for an unary operator with one input and one
145+
result.
145146
146147
This base class defines the `nin` and `nout` attributes. The derived
147148
concrete operator must provide the remaining abstract attributes
@@ -154,7 +155,8 @@ class UnaryOperator(Operator):
154155

155156

156157
class BinaryOperator(Operator):
157-
"""Abstract class for a binary operator with two inputs and one result.
158+
"""Abstract class for a binary operator with two inputs and one
159+
result.
158160
159161
This base class defines the `nin` and `nout` attributes. The derived
160162
concrete operator must define the remaining abstract attributes
@@ -359,7 +361,8 @@ def __init__(self, op):
359361

360362

361363
class ArrayOperator(Operator):
362-
"""Operator that will take parameters and turn them into an array."""
364+
"""Operator that will take parameters and turn them into an
365+
array."""
363366

364367
name = "array"
365368
symbol = "array"

src/diffpy/srfit/equation/visitors/printer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
# See LICENSE_DANSE.txt for license information.
1313
#
1414
##############################################################################
15-
"""Printer visitor for printing the equation represented by a Literal tree.
15+
"""Printer visitor for printing the equation represented by a Literal
16+
tree.
1617
1718
The Printer visitor creates a one-line representation of the Literal
1819
tree, which is valid as a string equivalent of the equation.

src/diffpy/srfit/equation/visitors/swapper.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@
1212
# See LICENSE_DANSE.txt for license information.
1313
#
1414
##############################################################################
15-
"""Swapper for replacing a Literal in an equation with another Literals."""
15+
"""Swapper for replacing a Literal in an equation with another
16+
Literals."""
1617

1718
__all__ = ["Swapper"]
1819

1920
from diffpy.srfit.equation.visitors.visitor import Visitor
2021

2122

2223
class Swapper(Visitor):
23-
"""Swapper for swapping out one literal for another in a literal tree.
24+
"""Swapper for swapping out one literal for another in a literal
25+
tree.
2426
2527
Note that this cannot swap out a root node of a literal tree. This case
2628
must be tested for explicitly.

0 commit comments

Comments
 (0)