Skip to content

Commit 033c93b

Browse files
committed
fix mistake
1 parent 400bd42 commit 033c93b

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/sage/combinat/ribbon_tableau.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
from sage.rings.integer import Integer
2727
from sage.combinat.combinat import CombinatorialElement
2828
from sage.combinat.skew_partition import SkewPartition, SkewPartitions
29-
from sage.combinat.skew_tableau import SkewTableau, SkewTableaux, SemistandardSkewTableaux
29+
from sage.combinat.skew_tableau import (SkewTableau, SkewTableaux,
30+
SemistandardSkewTableaux)
3031
from sage.combinat.tableau import Tableaux
3132
from sage.combinat.partition import Partition, _Partitions
3233
from sage.combinat.permutation import to_standard
@@ -94,7 +95,8 @@ def __classcall_private__(cls, rt=None, expr=None):
9495
try:
9596
rt = [tuple(row) for row in rt]
9697
except TypeError:
97-
raise TypeError("each element of the ribbon tableau must be an iterable")
98+
raise TypeError("each element of the ribbon tableau "
99+
"must be an iterable")
98100
if not all(row for row in rt):
99101
raise TypeError("a ribbon tableau cannot have empty rows")
100102
# calls the inherited __init__ method (of SkewTableau )
@@ -195,9 +197,10 @@ class RibbonTableaux(UniqueRepresentation, Parent):
195197
196198
REFERENCES:
197199
198-
.. [vanLeeuwen91] Marc. A. A. van Leeuwen, *Edge sequences, ribbon tableaux,
199-
and an action of affine permutations*. Europe J. Combinatorics. **20**
200-
(1999). http://wwwmathlabo.univ-poitiers.fr/~maavl/pdf/edgeseqs.pdf
200+
.. [vanLeeuwen91] Marc. A. A. van Leeuwen, *Edge sequences,
201+
ribbon tableaux, and an action of affine permutations*.
202+
Europe J. Combinatorics. **20** (1999).
203+
http://wwwmathlabo.univ-poitiers.fr/~maavl/pdf/edgeseqs.pdf
201204
"""
202205
@staticmethod
203206
def __classcall_private__(cls, shape=None, weight=None, length=None):
@@ -318,10 +321,11 @@ def __iter__(self):
318321
sage: RibbonTableaux([[2,2],[]],[1,1],2).list()
319322
[[[0, 0], [1, 2]], [[1, 0], [2, 0]]]
320323
"""
321-
for x in graph_implementation_rec(self._shape, self._weight, self._length, list_rec):
324+
for x in graph_implementation_rec(self._shape, self._weight,
325+
self._length, list_rec):
322326
yield self.from_expr(x)
323327

324-
def _repr_(self):
328+
def _repr_(self) -> str:
325329
"""
326330
Return a string representation of ``self``.
327331
@@ -332,7 +336,7 @@ def _repr_(self):
332336
"""
333337
return "Ribbon tableaux of shape %s and weight %s with %s-ribbons" % (repr(self._shape), list(self._weight), self._length)
334338

335-
def __contains__(self, x):
339+
def __contains__(self, x) -> bool:
336340
"""
337341
Note that this just checks to see if ``x`` appears in ``self``.
338342
@@ -854,7 +858,7 @@ def weight(self):
854858
sage: a.weight()
855859
[5, 3, 1]
856860
"""
857-
weights = (x.weight() for x in self)
861+
weights = [x.weight() for x in self]
858862
m = max(len(x) for x in weights)
859863
weight = [0] * m
860864
for w in weights:

0 commit comments

Comments
 (0)