Skip to content

Commit 72ab0b8

Browse files
committed
make linter happier
1 parent 753cd68 commit 72ab0b8

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/sage/schemes/elliptic_curves/ell_field.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,8 +904,10 @@ def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True, al
904904
ValueError: The polynomial x^2 + (-396/5*a - 2472/5)*x + 223344/5*a - 196272/5 does not define a finite subgroup of Elliptic Curve defined by y^2 = x^3 + (-13392)*x + (-1080432) over Number Field in a with defining polynomial x^2 - x - 1.
905905
"""
906906
if algorithm == "factored":
907-
if degree is not None: raise TypeError('algorithm="factored" does not support the "degree" parameter')
908-
if model is not None: raise TypeError('algorithm="factored" does not support the "model" parameter')
907+
if degree is not None:
908+
raise TypeError('algorithm="factored" does not support the "degree" parameter')
909+
if model is not None:
910+
raise TypeError('algorithm="factored" does not support the "model" parameter')
909911
from sage.schemes.elliptic_curves.hom_composite import EllipticCurveHom_composite
910912
return EllipticCurveHom_composite(self, kernel, codomain=codomain)
911913
try:

src/sage/schemes/elliptic_curves/hom_composite.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,9 +833,11 @@ def _composition_(self, other, homset):
833833
if not isinstance(self, EllipticCurveHom) or not isinstance(other, EllipticCurveHom):
834834
raise TypeError(f'cannot compose {type(self)} with {type(other)}')
835835
ret = self._composition_impl(self, other)
836-
if ret is not NotImplemented: return ret
836+
if ret is not NotImplemented:
837+
return ret
837838
ret = other._composition_impl(self, other)
838-
if ret is not NotImplemented: return ret
839+
if ret is not NotImplemented:
840+
return ret
839841
return EllipticCurveHom_composite.from_factors([other, self])
840842
EllipticCurveHom._composition_ = _composition_
841843

0 commit comments

Comments
 (0)