Skip to content

Commit bfdfed6

Browse files
author
Release Manager
committed
Trac #34671: fix the linter again
as some recent tickets have added final empty lines in some files URL: https://trac.sagemath.org/34671 Reported by: chapoton Ticket author(s): Frédéric Chapoton Reviewer(s): Matthias Koeppe
2 parents 39f9b5d + 8eedb6c commit bfdfed6

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

src/sage/combinat/species/all.py

-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,3 @@
4848
lazy_import("sage.combinat.species.recursive_species", "CombinatorialSpecies")
4949
lazy_import("sage.combinat.species", "library", as_="species")
5050
del lazy_import
51-

src/sage/combinat/species/library.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Examples of Combinatorial Species
33
"""
4-
#*****************************************************************************
4+
# ****************************************************************************
55
# Copyright (C) 2008 Mike Hansen <[email protected]>,
66
#
77
# Distributed under the terms of the GNU General Public License (GPL)
@@ -13,8 +13,8 @@
1313
#
1414
# The full text of the GPL is available at:
1515
#
16-
# http://www.gnu.org/licenses/
17-
#*****************************************************************************
16+
# https://www.gnu.org/licenses/
17+
# ****************************************************************************
1818

1919
from .set_species import SetSpecies
2020
from .partition_species import PartitionSpecies
@@ -32,6 +32,7 @@
3232

3333
from sage.misc.cachefunc import cached_function
3434

35+
3536
@cached_function
3637
def SimpleGraphSpecies():
3738
"""
@@ -66,7 +67,7 @@ def SimpleGraphSpecies():
6667
E = SetSpecies()
6768
E2 = SetSpecies(size=2)
6869
WP = SubsetSpecies()
69-
P2 = E2*E
70+
P2 = E2 * E
7071
return WP.functorial_composition(P2)
7172

7273

@@ -104,9 +105,10 @@ def BinaryTreeSpecies():
104105
"""
105106
B = CombinatorialSpecies(min=1)
106107
X = SingletonSpecies()
107-
B.define(X + B*B)
108+
B.define(X + B * B)
108109
return B
109110

111+
110112
@cached_function
111113
def BinaryForestSpecies():
112114
"""
@@ -141,5 +143,5 @@ def BinaryForestSpecies():
141143
F = S(B)
142144
return F
143145

144-
del cached_function # so it doesn't get picked up by tab completion
145146

147+
del cached_function # so it doesn't get picked up by tab completion

src/sage/schemes/elliptic_curves/hom.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,9 @@ def scaling_factor(self):
353353
...
354354
NotImplementedError: ...
355355
"""
356-
#TODO: could have a default implementation that simply
357-
# returns .formal()[1], but it seems safer to fail
358-
# visibly to make sure we would notice regressions
356+
# TODO: could have a default implementation that simply
357+
# returns .formal()[1], but it seems safer to fail
358+
# visibly to make sure we would notice regressions
359359
raise NotImplementedError('children must implement')
360360

361361
def formal(self, prec=20):
@@ -576,7 +576,7 @@ def is_injective(self):
576576
True
577577
"""
578578
if not self.is_separable():
579-
#TODO: should implement .separable_degree() or similar
579+
# TODO: should implement .separable_degree() or similar
580580
raise NotImplementedError
581581
return self.degree() == 1
582582

@@ -746,4 +746,3 @@ def compare_via_evaluation(left, right):
746746
assert False, "couldn't find a point of infinite order"
747747
else:
748748
raise NotImplementedError('not implemented for this base field')
749-

src/sage/schemes/elliptic_curves/hom_composite.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191

9292
# TODO: Implement sparse strategies? (cf. the SIKE cryptosystem)
9393

94+
9495
def _eval_factored_isogeny(phis, P):
9596
"""
9697
This method pushes a point `P` through a given sequence ``phis``
@@ -115,6 +116,7 @@ def _eval_factored_isogeny(phis, P):
115116
P = phi(P)
116117
return P
117118

119+
118120
def _compute_factored_isogeny_prime_power(P, l, e):
119121
"""
120122
This method takes a point `P` of order `l^e` and returns
@@ -143,6 +145,7 @@ def _compute_factored_isogeny_prime_power(P, l, e):
143145
phis.append(phi)
144146
return phis
145147

148+
146149
def _compute_factored_isogeny_single_generator(P):
147150
"""
148151
This method takes a point `P` and returns a sequence of
@@ -169,6 +172,7 @@ def _compute_factored_isogeny_single_generator(P):
169172
phis += psis
170173
return phis
171174

175+
172176
def _compute_factored_isogeny(kernel):
173177
"""
174178
This method takes a set of points on an elliptic curve
@@ -195,6 +199,7 @@ def _compute_factored_isogeny(kernel):
195199
phis += psis
196200
return phis
197201

202+
198203
class EllipticCurveHom_composite(EllipticCurveHom):
199204

200205
_degree = None
@@ -512,14 +517,14 @@ def _composition_impl(left, right):
512517
To: Elliptic Curve defined by y^2 + (I+1)*x*y = x^3 + I*x^2 + (-4)*x + (-6*I) over Number Field in I with defining polynomial x^2 + 1 with I = 1*I
513518
"""
514519
if isinstance(left, EllipticCurveHom_composite):
515-
if isinstance(right, WeierstrassIsomorphism) and hasattr(left.factors()[0], '_set_pre_isomorphism'): #XXX bit of a hack
520+
if isinstance(right, WeierstrassIsomorphism) and hasattr(left.factors()[0], '_set_pre_isomorphism'): # XXX bit of a hack
516521
return EllipticCurveHom_composite.from_factors((left.factors()[0] * right,) + left.factors()[1:], strict=False)
517522
if isinstance(right, EllipticCurveHom_composite):
518523
return EllipticCurveHom_composite.from_factors(right.factors() + left.factors())
519524
if isinstance(right, EllipticCurveHom):
520525
return EllipticCurveHom_composite.from_factors((right,) + left.factors())
521526
if isinstance(right, EllipticCurveHom_composite):
522-
if isinstance(left, WeierstrassIsomorphism) and hasattr(right.factors()[-1], '_set_post_isomorphism'): #XXX bit of a hack
527+
if isinstance(left, WeierstrassIsomorphism) and hasattr(right.factors()[-1], '_set_post_isomorphism'): # XXX bit of a hack
523528
return EllipticCurveHom_composite.from_factors(right.factors()[:-1] + (left * right.factors()[-1],), strict=False)
524529
if isinstance(left, EllipticCurveHom):
525530
return EllipticCurveHom_composite.from_factors(right.factors() + (left,))
@@ -787,4 +792,3 @@ def make_default():
787792
"""
788793
from sage.misc.superseded import deprecation
789794
deprecation(34410, 'calling EllipticCurveHom_composite.make_default() is no longer necessary')
790-

0 commit comments

Comments
 (0)