Skip to content

Commit cfbbce0

Browse files
author
Release Manager
committed
Trac #34672: some care for trailing whitespaces
pycodestyle W2 and W3 here both in some py and pyx files URL: https://trac.sagemath.org/34672 Reported by: chapoton Ticket author(s): Frédéric Chapoton Reviewer(s): Matthias Koeppe
2 parents 4006771 + ca00c97 commit cfbbce0

File tree

69 files changed

+90
-171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+90
-171
lines changed

src/sage/algebras/cellular_basis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
r"""
1+
r"""
22
Cellular Basis
33
==============
44

src/sage/algebras/clifford_algebra_element.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,4 +982,3 @@ cdef class CohomologyRAAGElement(CliffordAlgebraElement):
982982
del d[tp]
983983

984984
return self.__class__(self._parent, d)
985-

src/sage/algebras/exterior_algebra_groebner.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,4 +715,3 @@ cdef class GroebnerStrategyDegLex(GroebnerStrategy):
715715

716716
from sage.combinat.combination import from_rank
717717
return FrozenBitset(from_rank(n, self.rank, deg))
718-

src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,4 +640,3 @@ cdef class FiniteDimensionalAlgebraElement(AlgebraElement):
640640
True
641641
"""
642642
return self.matrix().characteristic_polynomial()
643-

src/sage/algebras/jordan_algebra.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ def _latex_(self):
397397
from sage.misc.latex import latex
398398
return latex(self._x)
399399

400-
def __bool__(self):
400+
def __bool__(self) -> bool:
401401
"""
402402
Return if ``self`` is non-zero.
403403
@@ -411,8 +411,6 @@ def __bool__(self):
411411
"""
412412
return bool(self._x)
413413

414-
415-
416414
def __eq__(self, other):
417415
"""
418416
Check equality.
@@ -817,7 +815,7 @@ def _latex_(self):
817815
from sage.misc.latex import latex
818816
return "{} + {}".format(latex(self._s), latex(self._v))
819817

820-
def __bool__(self):
818+
def __bool__(self) -> bool:
821819
"""
822820
Return if ``self`` is non-zero.
823821
@@ -834,8 +832,6 @@ def __bool__(self):
834832
"""
835833
return bool(self._s) or bool(self._v)
836834

837-
838-
839835
def __eq__(self, other):
840836
"""
841837
Check equality.

src/sage/algebras/lie_algebras/classical_lie_algebra.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@ def _unicode_art_(self):
13321332
from sage.typeset.unicode_art import unicode_art
13331333
return unicode_art(self._combined_matrix())
13341334

1335-
def __bool__(self):
1335+
def __bool__(self) -> bool:
13361336
r"""
13371337
Return if ``self`` is nonzero.
13381338
@@ -1346,8 +1346,6 @@ def __bool__(self):
13461346
"""
13471347
return bool(self._real) or bool(self._imag)
13481348

1349-
1350-
13511349
def __hash__(self):
13521350
r"""
13531351
Return the hash of ``self``.

src/sage/algebras/lie_algebras/lie_algebra_element.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1997,4 +1997,3 @@ cdef class LyndonBracket(GradedLieBracket):
19971997
if self._hash == -1:
19981998
self._hash = hash(self._index_word)
19991999
return self._hash
2000-

src/sage/algebras/quatalg/quaternion_algebra_cython.pyx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,5 +260,3 @@ def rational_quaternions_from_integral_matrix_and_denom(A, Matrix_integer_dense
260260
v.append(x)
261261
mpz_clear(tmp)
262262
return v
263-
264-

src/sage/categories/crystals.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2187,7 +2187,7 @@ def _call_(self, x):
21872187
cur = cur.e_string(s)
21882188
return cur
21892189

2190-
def __bool__(self):
2190+
def __bool__(self) -> bool:
21912191
"""
21922192
Return if ``self`` is a non-zero morphism.
21932193
@@ -2204,8 +2204,6 @@ def __bool__(self):
22042204
"""
22052205
return any(self._on_gens(mg) is not None for mg in self._gens)
22062206

2207-
2208-
22092207
# TODO: Does this belong in the element_class of the Crystals() category?
22102208
def to_module_generator(self, x):
22112209
"""

src/sage/categories/examples/commutative_additive_monoids.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def zero(self):
112112
return self(())
113113

114114
class Element(FreeCommutativeAdditiveSemigroup.Element):
115-
def __bool__(self):
115+
def __bool__(self) -> bool:
116116
"""
117117
Check if ``self`` is not the zero of the monoid
118118
@@ -126,6 +126,5 @@ def __bool__(self):
126126
"""
127127
return any(x for x in self.value.values())
128128

129-
130129

131130
Example = FreeCommutativeAdditiveMonoid

0 commit comments

Comments
 (0)