@@ -823,7 +823,7 @@ class QuaternionAlgebra_ab(QuaternionAlgebra_abstract):
823823 sage: QuaternionAlgebra(QQ, -7, -21) # indirect doctest
824824 Quaternion Algebra (-7, -21) with base ring Rational Field
825825 """
826- def __init__ (self , base_ring , a , b , names = 'i,j,k' ):
826+ def __init__ (self , base_ring , a , b , names = 'i,j,k' ) -> None :
827827 """
828828 Create the quaternion algebra with `i^2 = a`, `j^2 = b`, and
829829 `ij = -ji = k`.
@@ -1234,7 +1234,7 @@ def invariants(self):
12341234 """
12351235 return self ._a , self ._b
12361236
1237- def __eq__ (self , other ):
1237+ def __eq__ (self , other ) -> bool :
12381238 """
12391239 Compare ``self`` and ``other``.
12401240
@@ -1250,7 +1250,7 @@ def __eq__(self, other):
12501250 return (self .base_ring () == other .base_ring () and
12511251 (self ._a , self ._b ) == (other ._a , other ._b ))
12521252
1253- def __ne__ (self , other ):
1253+ def __ne__ (self , other ) -> bool :
12541254 """
12551255 Compare ``self`` and ``other``.
12561256
@@ -1263,7 +1263,7 @@ def __ne__(self, other):
12631263 """
12641264 return not self .__eq__ (other )
12651265
1266- def __hash__ (self ):
1266+ def __hash__ (self ) -> int :
12671267 """
12681268 Compute the hash of ``self``.
12691269
@@ -1985,7 +1985,7 @@ class QuaternionOrder(Parent):
19851985 sage: type(QuaternionAlgebra(-1,-7).maximal_order())
19861986 <class 'sage.algebras.quatalg.quaternion_algebra.QuaternionOrder_with_category'>
19871987 """
1988- def __init__ (self , A , basis , check = True ):
1988+ def __init__ (self , A , basis , check = True ) -> None :
19891989 """
19901990 INPUT:
19911991
@@ -2186,7 +2186,7 @@ def gen(self, n):
21862186 """
21872187 return self .__basis [n ]
21882188
2189- def __richcmp__ (self , other , op ):
2189+ def __richcmp__ (self , other , op ) -> bool :
21902190 """
21912191 Compare this quaternion order to ``other``.
21922192
@@ -2239,7 +2239,7 @@ def __richcmp__(self, other, op):
22392239 return op == op_NE
22402240 return richcmp (self .unit_ideal (), other .unit_ideal (), op )
22412241
2242- def __hash__ (self ):
2242+ def __hash__ (self ) -> int :
22432243 """
22442244 Compute the hash of ``self``.
22452245
@@ -3013,7 +3013,8 @@ class QuaternionFractionalIdeal_rational(QuaternionFractionalIdeal):
30133013 - ``check`` -- boolean (default: ``True``); if ``False``, do no type
30143014 checking.
30153015 """
3016- def __init__ (self , Q , basis , left_order = None , right_order = None , check = True ):
3016+ def __init__ (self , Q , basis , left_order = None ,
3017+ right_order = None , check = True ) -> None :
30173018 """
30183019 EXAMPLES::
30193020
@@ -3267,7 +3268,7 @@ def right_order(self):
32673268 self .__right_order = self ._compute_order (side = 'right' )
32683269 return self .__right_order
32693270
3270- def __repr__ (self ):
3271+ def __repr__ (self ) -> str :
32713272 """
32723273 Return string representation of this quaternion fractional ideal.
32733274
@@ -3361,7 +3362,7 @@ def _richcmp_(self, right, op):
33613362 """
33623363 return self .free_module ().__richcmp__ (right .free_module (), op )
33633364
3364- def __hash__ (self ):
3365+ def __hash__ (self ) -> int :
33653366 """
33663367 Return the hash of ``self``.
33673368
@@ -4165,7 +4166,7 @@ def is_principal(self, certificate=False):
41654166 # find an element of minimal norm in self; see [Piz1980]_, Corollary 1.20.
41664167 return True , self .minimal_element ()
41674168
4168- def __contains__ (self , x ):
4169+ def __contains__ (self , x ) -> bool :
41694170 """
41704171 Return whether ``x`` is in ``self``.
41714172
0 commit comments