Skip to content

Commit 7acd286

Browse files
author
Release Manager
committed
Trac #34640: fix some pep8 in words/
URL: https://trac.sagemath.org/34640 Reported by: chapoton Ticket author(s): Frédéric Chapoton Reviewer(s): Matthias Koeppe
2 parents 451e2b6 + 5a339e1 commit 7acd286

File tree

9 files changed

+133
-36
lines changed

9 files changed

+133
-36
lines changed

build/pkgs/configure/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=configure-VERSION.tar.gz
2-
sha1=73f9fe2ad9e2cfe224c7667a784144a1c520b9d8
3-
md5=8be336b502a66c5a410183be1eca2ca9
4-
cksum=42655200
2+
sha1=2f4aa4b3eaa90d73b67907839f761af1f33ef978
3+
md5=4d3a0c6c5cc46758789f117cc5c64a9c
4+
cksum=3260232553
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
51d49e23f3d3014e301fefcf72bf7a2a3fe0c4e0
1+
cfb40bc006de1c9273edfd4519d8d8021d9c5ff5

src/sage/combinat/words/finite_word.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5950,7 +5950,6 @@ def sturmian_desubstitute_as_possible(self):
59505950
desubstitued_word = desubstitued_word + w_running ** (current_run_length - min_run)
59515951
return desubstitued_word.sturmian_desubstitute_as_possible()
59525952

5953-
59545953
def is_sturmian_factor(self):
59555954
r"""
59565955
Tell whether ``self`` is a factor of a Sturmian word.
@@ -6011,7 +6010,6 @@ def is_sturmian_factor(self):
60116010
"""
60126011
return self.sturmian_desubstitute_as_possible().is_empty()
60136012

6014-
60156013
def is_tangent(self):
60166014
r"""
60176015
Tell whether ``self`` is a tangent word.
@@ -6081,7 +6079,6 @@ def is_tangent(self):
60816079
mini = min(mini , height)
60826080
return (maxi - mini <= 2)
60836081

6084-
60856082
# TODO.
60866083
# 1. Those three swap functions should use the cmp of python.
60876084
# 2. The actual code should then be copied as is in the Word_over_Alphabet
@@ -7176,7 +7173,6 @@ def minimal_conjugate(self):
71767173
if end >= p.length():
71777174
return factor ** q
71787175

7179-
#######################################################################
71807176

71817177
class CallableFromListOfWords(tuple):
71827178
r"""
@@ -7223,6 +7219,7 @@ def __call__(self, i):
72237219
j -= c.length()
72247220
raise IndexError("index (=%s) out of range" % i)
72257221

7222+
72267223
class Factorization(list):
72277224
r"""
72287225
A list subclass having a nicer representation for factorization of words.
@@ -7246,6 +7243,7 @@ def __repr__(self):
72467243
"""
72477244
return '(%s)' % ', '.join(w.string_rep() for w in self)
72487245

7246+
72497247
#######################################################################
72507248

72517249
def evaluation_dict(w):
@@ -7271,13 +7269,13 @@ def evaluation_dict(w):
72717269
72727270
sage: evaluation_dict('1213121') # keys appear in random order
72737271
{'1': 4, '2': 2, '3': 1}
7274-
72757272
"""
72767273
d = defaultdict(int)
72777274
for a in w:
72787275
d[a] += 1
72797276
return dict(d)
72807277

7278+
72817279
def word_to_ordered_set_partition(w):
72827280
r"""
72837281
Return the ordered set partition corresponding to a finite

src/sage/combinat/words/lyndon_word.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ def standard_bracketing(lw):
613613
if lw[i:] in LyndonWords():
614614
return [standard_bracketing(lw[:i]), standard_bracketing(lw[i:])]
615615

616+
616617
def standard_unbracketing(sblw):
617618
"""
618619
Return flattened ``sblw`` if it is a standard bracketing of a Lyndon word,

0 commit comments

Comments
 (0)