Skip to content

Commit 7d21dcd

Browse files
committed
[NFC] Remove some trailing whitespace and a few other weirdly-placed whitespaces
1 parent e538304 commit 7d21dcd

File tree

6 files changed

+30
-28
lines changed

6 files changed

+30
-28
lines changed

lnt/external/stats/stats.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
77
# copies of the Software, and to permit persons to whom the Software is
88
# furnished to do so, subject to the following conditions:
9-
#
9+
#
1010
# The above copyright notice and this permission notice shall be included in
1111
# all copies or substantial portions of the Software.
12-
#
12+
#
1313
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1414
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1515
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -20,7 +20,7 @@
2020
#
2121
# Comments and/or additions are welcome (send e-mail to:
2222
23-
#
23+
#
2424
"""
2525
stats.py module
2626
@@ -134,7 +134,7 @@
134134
ksprob
135135
fprob
136136
betacf
137-
gammln
137+
gammln
138138
betai
139139
140140
ANOVA FUNCTIONS: F_oneway
@@ -960,7 +960,7 @@ def lkendalltau(x, y):
960960

961961
def llinregress(x, y):
962962
"""
963-
Calculates a regression line on x,y pairs.
963+
Calculates a regression line on x,y pairs.
964964
965965
Usage: llinregress(x,y) x,y are equal-length lists of x-y coordinates
966966
Returns: slope, intercept, r, two-tailed prob, sterr-of-estimate
@@ -1255,7 +1255,7 @@ def lkruskalwallish(*args):
12551255
The Kruskal-Wallis H-test is a non-parametric ANOVA for 3 or more
12561256
groups, requiring at least 5 subjects in each group. This function
12571257
calculates the Kruskal-Wallis H-test for 3 or more independent samples
1258-
and returns the result.
1258+
and returns the result.
12591259
12601260
Usage: lkruskalwallish(*args)
12611261
Returns: H-statistic (corrected for ties), associated p-value
@@ -1394,7 +1394,7 @@ def lerfcc(x):
13941394
def lzprob(z):
13951395
"""
13961396
Returns the area under the normal curve 'to the left of' the given z value.
1397-
Thus,
1397+
Thus,
13981398
for z<0, zprob(z) = 1-tail probability
13991399
for z>0, 1.0-zprob(z) = 1-tail probability
14001400
for any z, 2.0*(1.0-zprob(abs(z))) = 2-tail probability
@@ -1847,7 +1847,7 @@ def lfindwithin (data):
18471847
Returns an integer representing a binary vector, where 1=within-
18481848
subject factor, 0=between. Input equals the entire data 2D list (i.e.,
18491849
column 0=random factor, column -1=measured values (those two are skipped).
1850-
Note: input data is in |Stat format ... a list of lists ("2D list") with
1850+
Note: input data is in |Stat format ... a list of lists ("2D list") with
18511851
one row per measured value, first column=subject identifier, last column=
18521852
score, one in-between column per factor (these columns contain level
18531853
designations on each factor). See also stats.anova.__doc__.
@@ -2234,7 +2234,7 @@ def atmean(a,limits=None,inclusive=(1, 1)):
22342234
def atvar(a,limits=None,inclusive=(1, 1)):
22352235
"""
22362236
Returns the sample variance of values in an array, (i.e., using N-1),
2237-
ignoring values strictly outside the sequence passed to 'limits'.
2237+
ignoring values strictly outside the sequence passed to 'limits'.
22382238
Note: either limit in the sequence, or the value of limits itself,
22392239
can be set to None. The inclusive list/tuple determines whether the lower
22402240
and upper limiting bounds (respectively) are open/exclusive (0) or
@@ -2387,8 +2387,8 @@ def avariation(a,dimension=None):
23872387
return 100.0*asamplestdev(a, dimension)/amean(a, dimension)
23882388

23892389

2390-
def askew(a,dimension=None):
2391-
"""
2390+
def askew(a,dimension=None):
2391+
"""
23922392
Returns the skewness of a distribution (normal ==> 0.0; >0 means extra
23932393
weight in left tail). Use askewtest() to see if it's close enough.
23942394
Dimension can equal None (ravel array first), an integer (the
@@ -2704,7 +2704,7 @@ def asamplevar (inarray,dimension=None,keepdims=0):
27042704
mn = amean(inarray, dimension)[:, N.NewAxis]
27052705
else:
27062706
mn = amean(inarray, dimension, keepdims=1)
2707-
deviations = inarray - mn
2707+
deviations = inarray - mn
27082708
if isinstance(dimension, list):
27092709
n = 1
27102710
for d in dimension:
@@ -3357,7 +3357,7 @@ def attest_ind (a, b, dimension=None, printit=0, name1='Samp1', name2='Samp2',wr
33573357
probs = N.reshape(probs, t.shape)
33583358
if probs.shape == (1,):
33593359
probs = probs[0]
3360-
3360+
33613361
if printit != 0:
33623362
if isinstance(t, N.ndarray):
33633363
t = t[0]
@@ -3782,7 +3782,7 @@ def aerfcc(x):
37823782
def azprob(z):
37833783
"""
37843784
Returns the area under the normal curve 'to the left of' the given z value.
3785-
Thus,
3785+
Thus,
37863786
for z<0, zprob(z) = 1-tail probability
37873787
for z>0, 1.0-zprob(z) = 1-tail probability
37883788
for any z, 2.0*(1.0-zprob(abs(z))) = 2-tail probability
@@ -4373,7 +4373,7 @@ def afindwithin(data):
43734373
(acumfreq, (N.ndarray,)) )
43744374
relfreq = Dispatch ( (lrelfreq, (list, tuple)),
43754375
(arelfreq, (N.ndarray,)) )
4376-
4376+
43774377
## VARIABILITY:
43784378
obrientransform = Dispatch ( (lobrientransform, (list, tuple)),
43794379
(aobrientransform, (N.ndarray,)) )
@@ -4394,14 +4394,14 @@ def afindwithin(data):
43944394
(az, (N.ndarray,)) )
43954395
zs = Dispatch ( (lzs, (list, tuple)),
43964396
(azs, (N.ndarray,)) )
4397-
4397+
43984398
## TRIMMING FCNS:
43994399
threshold = Dispatch( (athreshold, (N.ndarray,)),)
44004400
trimboth = Dispatch ( (ltrimboth, (list, tuple)),
44014401
(atrimboth, (N.ndarray,)) )
44024402
trim1 = Dispatch ( (ltrim1, (list, tuple)),
44034403
(atrim1, (N.ndarray,)) )
4404-
4404+
44054405
## CORRELATION FCNS:
44064406
paired = Dispatch ( (lpaired, (list, tuple)),
44074407
(apaired, (N.ndarray,)) )
@@ -4417,7 +4417,7 @@ def afindwithin(data):
44174417
(akendalltau, (N.ndarray,)) )
44184418
linregress = Dispatch ( (llinregress, (list, tuple)),
44194419
(alinregress, (N.ndarray,)) )
4420-
4420+
44214421
## INFERENTIAL STATS:
44224422
ttest_1samp = Dispatch ( (lttest_1samp, (list, tuple)),
44234423
(attest_1samp, (N.ndarray,)) )
@@ -4441,7 +4441,7 @@ def afindwithin(data):
44414441
(akruskalwallish, (N.ndarray,)) )
44424442
friedmanchisquare = Dispatch ( (lfriedmanchisquare, (list, tuple)),
44434443
(afriedmanchisquare, (N.ndarray,)) )
4444-
4444+
44454445
## PROBABILITY CALCS:
44464446
chisqprob = Dispatch ( (lchisqprob, (int, float)),
44474447
(achisqprob, (N.ndarray,)) )
@@ -4459,7 +4459,7 @@ def afindwithin(data):
44594459
(aerfcc, (N.ndarray,)) )
44604460
gammln = Dispatch ( (lgammln, (int, float)),
44614461
(agammln, (N.ndarray,)) )
4462-
4462+
44634463
## ANOVA FUNCTIONS:
44644464
F_oneway = Dispatch ( (lF_oneway, (list, tuple)),
44654465
(aF_oneway, (N.ndarray,)) )

lnt/server/db/testsuite.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,9 @@ def __json__(self):
237237
class FieldMixin(object):
238238
@property
239239
def title(self):
240-
""" Return a title for the given field by replacing all _ with
241-
spaces and that has every word capitalized.
240+
"""
241+
Return a title for the given field by replacing all _ with
242+
spaces and that has every word capitalized.
242243
"""
243244
return self.name.replace("_", " ").title()
244245

lnt/server/ui/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ def internal_server_error(e):
190190

191191
@staticmethod
192192
def create_standalone(config_path, log_file=None):
193-
""" Create an instance of a lnt Flask application from a config file.
193+
"""
194+
Create an instance of a lnt Flask application from a config file.
194195
195196
:param config_path: path to lnt config (directory or config file).
196197

lnt/server/ui/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ def load_geomean_data(field, machine, limit, xaxis_date, revision_cache=None):
974974

975975
@v4_route("/tableau")
976976
def v4_tableau():
977-
""" Tableau WDC."""
977+
"""Tableau WDC."""
978978
return render_template("v4_tableau.html")
979979

980980

lnt/tests/nt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def llvm_source_version(self):
213213

214214
@property
215215
def qemu_user_mode_command(self):
216-
""" The command used for qemu user mode """
216+
"""The command used for qemu user mode """
217217
assert self.qemu_user_mode
218218
qemu_cmd_line = [self.qemu_user_mode] + list(self.qemu_flags)
219219
if self.qemu_string:
@@ -222,7 +222,7 @@ def qemu_user_mode_command(self):
222222

223223
@property
224224
def generate_report_script(self):
225-
""" The path to the report generation script. """
225+
"""The path to the report generation script. """
226226
return os.path.join(self.test_suite_root, "GenerateReport.pl")
227227

228228
def build_report_path(self, iteration):

tests/server/ui/test_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@ def test_run_api(self):
182182
check_json(client, 'api/db_default/v4/nts/runs/100', expected_code=404)
183183

184184
def test_order_api(self):
185-
""" Check /orders/n returns the expected order information."""
185+
"""Check /orders/n returns the expected order information."""
186186
client = self.client
187187
j = check_json(client, 'api/db_default/v4/nts/orders/1')
188188
self.assertEqual(j['orders'][0], order_expected_response)
189189
self._check_response_is_well_formed(j)
190190
check_json(client, 'api/db_default/v4/nts/orders/100', expected_code=404)
191191

192192
def test_single_sample_api(self):
193-
""" Check /samples/n returns the expected sample information."""
193+
"""Check /samples/n returns the expected sample information."""
194194
client = self.client
195195
j = check_json(client, 'api/db_default/v4/nts/samples/1')
196196
self._check_response_is_well_formed(j)

0 commit comments

Comments
 (0)