Skip to content

Commit 7c8291c

Browse files
committed
fix most E301 warnings
1 parent 443b754 commit 7c8291c

File tree

29 files changed

+60
-19
lines changed

29 files changed

+60
-19
lines changed

src/sage/algebras/free_algebra.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ class FreeAlgebra_generic(CombinatorialFreeModule, Algebra):
420420
is a coercion.
421421
"""
422422
Element = FreeAlgebraElement
423+
423424
def __init__(self, R, n, names):
424425
"""
425426
The free algebra on `n` generators over a base ring.

src/sage/algebras/lie_conformal_algebras/finitely_freely_generated_lca.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ def _repr_(self):
7373
return "Lie conformal algebra generated by {0} over {1}".format(
7474
self.gen(0), self.base_ring())
7575
return "Lie conformal algebra with generators {0} over {1}".format(
76-
self.gens(), self.base_ring())
76+
self.gens(), self.base_ring())
77+
7778
def _an_element_(self):
7879
"""
7980
An element of this Lie conformal algebra.

src/sage/categories/category_with_axiom.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2764,21 +2764,25 @@ def super_categories(self):
27642764
class FiniteDimensional(CategoryWithAxiom):
27652765
class Finite(CategoryWithAxiom):
27662766
pass
2767+
27672768
class Unital(CategoryWithAxiom):
27682769
class Commutative(CategoryWithAxiom):
27692770
pass
27702771

27712772
class Commutative(CategoryWithAxiom):
27722773
class Facade(CategoryWithAxiom):
27732774
pass
2775+
27742776
class FiniteDimensional(CategoryWithAxiom):
27752777
pass
2778+
27762779
class Finite(CategoryWithAxiom):
27772780
pass
27782781

27792782
class Unital(CategoryWithAxiom):
27802783
pass
27812784

2785+
27822786
class TestObjectsOverBaseRing(Category_over_base_ring):
27832787
r"""
27842788
A toy singleton category, for testing purposes.
@@ -2805,15 +2809,18 @@ def super_categories(self):
28052809
class FiniteDimensional(CategoryWithAxiom_over_base_ring):
28062810
class Finite(CategoryWithAxiom_over_base_ring):
28072811
pass
2812+
28082813
class Unital(CategoryWithAxiom_over_base_ring):
28092814
class Commutative(CategoryWithAxiom_over_base_ring):
28102815
pass
28112816

28122817
class Commutative(CategoryWithAxiom_over_base_ring):
28132818
class Facade(CategoryWithAxiom_over_base_ring):
28142819
pass
2820+
28152821
class FiniteDimensional(CategoryWithAxiom_over_base_ring):
28162822
pass
2823+
28172824
class Finite(CategoryWithAxiom_over_base_ring):
28182825
pass
28192826

src/sage/categories/examples/sets_cat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ def _from_integer_(self, e):
539539
return self.element_class(self, Integer(e))
540540

541541
from sage.structure.element_wrapper import ElementWrapper
542+
542543
class Element (ElementWrapper, PrimeNumbers_Abstract.Element):
543544
def _integer_(self, IntRing):
544545
"""

src/sage/categories/finitely_generated_lambda_bracket_algebras.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class FinitelyGeneratedLambdaBracketAlgebras(CategoryWithAxiom_over_base_ring):
3131
Category of finitely generated lambda bracket algebras over Algebraic Field
3232
"""
3333
_base_category_class_and_axiom = (LambdaBracketAlgebras, "FinitelyGeneratedAsLambdaBracketAlgebra")
34+
3435
class ParentMethods:
3536
def ngens(self):
3637
r"""

src/sage/categories/lambda_bracket_algebras.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ def ideal(self, *gens, **kwds):
126126
"""
127127
raise NotImplementedError("ideals of Lie Conformal algebras are "
128128
"not implemented yet")
129+
129130
class ElementMethods:
130131

131132
@coerce_binop

src/sage/coding/golay_code.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def __eq__(self, other):
118118
"""
119119
return isinstance(other, GolayCode) \
120120
and self.base_field() == other.base_field() \
121-
and self.length() == other.length() \
121+
and self.length() == other.length()
122122

123123
def _repr_(self):
124124
r"""
@@ -133,8 +133,8 @@ def _repr_(self):
133133
ext = ""
134134
if n % 2 == 0:
135135
ext = "Extended"
136-
return "[%s, %s, %s] %s Golay code over GF(%s)"\
137-
% (n, self.dimension(), self.minimum_distance(), ext, self.base_field().cardinality())
136+
return "[%s, %s, %s] %s Golay code over GF(%s)" % (n, self.dimension(),
137+
self.minimum_distance(), ext, self.base_field().cardinality())
138138

139139
def _latex_(self):
140140
r"""

src/sage/coding/goppa_code.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ def _repr_(self):
139139
[8, 2] Goppa code over GF(2)
140140
"""
141141
return "[{}, {}] Goppa code over GF({})".format(
142-
self.length(), self.dimension(), self.base_field().cardinality())
142+
self.length(), self.dimension(),
143+
self.base_field().cardinality())
144+
143145
def _latex_(self):
144146
r"""
145147
Return a latex representation of ``self``.

src/sage/crypto/mq/sr.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3301,6 +3301,7 @@ def __init__(self, sr):
33013301
a^2 + a
33023302
"""
33033303
self.sr = sr
3304+
33043305
def __enter__(self):
33053306
"""
33063307
EXAMPLES::
@@ -3318,6 +3319,7 @@ def __enter__(self):
33183319
"""
33193320
self.allow_zero_inversions = self.sr._allow_zero_inversions
33203321
self.sr._allow_zero_inversions = True
3322+
33213323
def __exit__(self, typ, value, tb):
33223324
"""
33233325
EXAMPLES::

src/sage/databases/findstat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4738,6 +4738,7 @@ def __init__(self):
47384738
# fields = "SageCodeElementToString,SageCodeElementsOnLevel,SageCodeStringToElement"
47394739
# url = FINDSTAT_API_COLLECTIONS + id + "?fields=" + fields
47404740
# print(json.load(urlopen(url))["included"]["Collections"][id])
4741+
47414742
def position(item):
47424743
try:
47434744
return tuple(_SupportedFindStatCollections).index(item[1]["NameWiki"])

0 commit comments

Comments
 (0)