Skip to content

Commit 02ce549

Browse files
committed
Use noqa for clear ladmbda in test builder
1 parent b478b10 commit 02ce549

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/diffpy/srfit/tests/testbuilder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def testParseEquation(self):
157157
eq.x.setValue(x)
158158
eq.B.setValue(B)
159159
eq.C.setValue(C)
160-
f = lambda A, x, B, C: A * sin(0.5 * x) + divide(B, C)
160+
f = lambda A, x, B, C: A * sin(0.5 * x) + divide(B, C) # noqa: E731
161161
self.assertTrue(array_equal(eq(), f(A, x, B, C)))
162162

163163
# Make sure that the arguments of eq are listed in the order in which
@@ -170,7 +170,7 @@ def testParseEquation(self):
170170
sigma = 0.1
171171
eq.x.setValue(x)
172172
eq.sigma.setValue(sigma)
173-
f = lambda x, sigma: sqrt(e ** (-0.5 * (x / sigma) ** 2))
173+
f = lambda x, sigma: sqrt(e ** (-0.5 * (x / sigma) ** 2)) # noqa: E731
174174
self.assertTrue(numpy.allclose(eq(), f(x, sigma)))
175175

176176
self.assertEqual(eq.args, [eq.x, eq.sigma])
@@ -246,7 +246,7 @@ def _f(a, b):
246246
sigma = builder.ArgumentBuilder(name="sigma", value=0.1)
247247
beq = sqrt(e ** (-0.5 * (x / sigma) ** 2))
248248
eq = beq.getEquation()
249-
f = lambda x, sigma: sqrt(e ** (-0.5 * (x / sigma) ** 2))
249+
f = lambda x, sigma: sqrt(e ** (-0.5 * (x / sigma) ** 2)) # noqa: E731
250250
self.assertTrue(numpy.allclose(eq(), numpy.sqrt(e ** (-0.5 * (_x / 0.1) ** 2))))
251251

252252
# Equation with Equation

0 commit comments

Comments
 (0)