Skip to content

Commit 526efac

Browse files
author
Matthias Koeppe
committed
Style fixes
1 parent e11afa7 commit 526efac

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/sage/groups/perm_gps/partn_ref/data_structures.pyx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ cdef int PS_first_smallest(PartitionStack *PS, bitset_t b, int *second_pos=NULL)
292292
"""
293293
cdef int i = 0, j = 0, location = 0, n = PS.degree
294294
bitset_zero(b)
295-
while 1:
295+
while True:
296296
if PS.levels[i] <= PS.depth:
297297
if i != j and n > i - j + 1:
298298
n = i - j + 1
@@ -304,19 +304,18 @@ cdef int PS_first_smallest(PartitionStack *PS, bitset_t b, int *second_pos=NULL)
304304
# location now points to the beginning of the first, smallest,
305305
# nontrivial cell
306306
i = location
307-
while 1:
307+
while True:
308308
bitset_flip(b, PS.entries[i])
309309
if PS.levels[i] <= PS.depth:
310310
break
311311
i += 1
312312

313313
if second_pos != NULL:
314-
if n==2:
315-
second_pos[0] = PS.entries[location+1]
314+
if n == 2:
315+
second_pos[0] = PS.entries[location + 1]
316316
else:
317317
second_pos[0] = -1
318318

319-
320319
return PS.entries[location]
321320

322321

src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -953,26 +953,28 @@ cdef int PS_first_smallest_PR(PartitionStack *PS, bitset_t b, int *second_pos=NU
953953
"""
954954
cdef int i = 0, j = 0, location = 0, n = PS.degree
955955
bitset_zero(b)
956-
while 1:
956+
while True:
957957
if PS.levels[i] <= PS.depth:
958958
if i != j and n > i - j + 1 and (partn_ref_alg is None or
959959
partn_ref_alg._minimization_allowed_on_col(PS.entries[j])):
960960
n = i - j + 1
961961
location = j
962962
j = i + 1
963-
if PS.levels[i] == -1: break
963+
if PS.levels[i] == -1:
964+
break
964965
i += 1
965966
# location now points to the beginning of the first, smallest,
966967
# nontrivial cell
967968
i = location
968-
while 1:
969+
while True:
969970
bitset_flip(b, PS.entries[i])
970-
if PS.levels[i] <= PS.depth: break
971+
if PS.levels[i] <= PS.depth:
972+
break
971973
i += 1
972974

973975
if second_pos != NULL:
974-
if n==2:
975-
second_pos[0] = PS.entries[location+1]
976+
if n == 2:
977+
second_pos[0] = PS.entries[location + 1]
976978
else:
977979
second_pos[0] = -1
978980

0 commit comments

Comments
 (0)