@@ -249,7 +249,7 @@ def _element_of_factored_order(self, F):
249249 @cached_method
250250 def quadratic_non_residue (self ):
251251 r"""
252- Returns a random non square element of the finite field
252+ Return a random non square element of the finite field
253253
254254 OUTPUT:
255255 A non-square element of the finite field; raises an error if
@@ -279,10 +279,11 @@ def quadratic_non_residue(self):
279279 class ElementMethods :
280280 def is_square (self ) -> bool :
281281 r"""
282- Tests if the element is a square or has
282+ Test if the element is a square or has
283283 a square root element.
284284
285- OUTPUT: ``True`` if the element is a square ``False`` if not
285+ OUTPUT:
286+ ``True`` if the element is a square ``False`` if not
286287
287288 EXAMPLES::
288289
@@ -307,11 +308,12 @@ def is_square(self) -> bool:
307308
308309 def _tonelli (self ):
309310 r"""
310- Returns a square root of the element if it exists
311+ Return a square root of the element if it exists
311312 using Tonelli's algorithm, only works for finite fields
312313 of odd characteristic.
313314
314- OUTPUT: A square root of the element; raises an error
315+ OUTPUT:
316+ A square root of the element; raises an error
315317 if the element is not a square
316318
317319 EXAMPLES::
@@ -344,12 +346,13 @@ def _tonelli(self):
344346
345347 def _cipolla (self ):
346348 r"""
347- Returns a square root of the element if it exists
349+ Return a square root of the element if it exists
348350 using Cipolla's algorithm, more suited if order - 1
349351 is highly divisible by 2. Only works for finite fields
350352 of odd characteristic.
351353
352- OUTPUT: A square root of the element; raises an error
354+ OUTPUT:
355+ A square root of the element; raises an error
353356 if the element is not a square
354357
355358 EXAMPLES::
@@ -381,7 +384,7 @@ def _cipolla(self):
381384
382385 def sqrt (self , all : bool = False , algorithm : str = 'tonelli' ):
383386 r"""
384- Returns the square root of the element if it exists.
387+ Return the square root of the element if it exists.
385388
386389 INPUT:
387390
@@ -456,7 +459,7 @@ def sqrt(self, all: bool = False, algorithm: str = 'tonelli'):
456459 square_root = self ** exponent
457460 if all :
458461 # we return a 1-tuple because the GF implementation does it
459- return (square_root )
462+ return (square_root , )
460463 else :
461464 return square_root
462465 if not self .is_square ():
0 commit comments