Skip to content

Commit d30d2ff

Browse files
author
Release Manager
committed
Trac #34601: fix W391 in modules, tests and rings
with #34596, we are almost there one file in rings is left aside for the moment URL: https://trac.sagemath.org/34601 Reported by: chapoton Ticket author(s): Frédéric Chapoton Reviewer(s): Matthias Koeppe
2 parents f36f46c + d4eddec commit d30d2ff

39 files changed

+4
-45
lines changed

src/sage/modules/free_module.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8243,4 +8243,3 @@ def __richcmp__(self, other, op):
82438243
True
82448244
"""
82458245
return self.obj._echelon_matrix_richcmp(other.obj, op)
8246-

src/sage/modules/module_functors.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class QuotientModuleFunctor(ConstructionFunctor):
7575
sage: Q2 = A2 / B2
7676
sage: q3 = Q1.an_element() + Q2.an_element()
7777
"""
78-
rank = 5 # ranking of functor, not rank of module
78+
rank = 5 # ranking of functor, not rank of module
7979

8080
def __init__(self, relations):
8181
"""
@@ -187,4 +187,3 @@ def merge(self, other):
187187
"""
188188
if isinstance(other, QuotientModuleFunctor):
189189
return QuotientModuleFunctor(self._relations + other._relations)
190-

src/sage/modules/submodule.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,4 +243,3 @@ def ambient_module(self):
243243
True
244244
"""
245245
return self._ambient
246-

src/sage/modules/with_basis/cell_module.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,4 +473,3 @@ def _acted_upon_(self, scalar, self_on_left=False):
473473
# For backward compatibility
474474
_lmul_ = _acted_upon_
475475
_rmul_ = _acted_upon_
476-

src/sage/modules/with_basis/morphism.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,6 +1551,7 @@ def pointwise_inverse_function(f):
15511551
return f.pointwise_inverse()
15521552
return PointwiseInverseFunction(f)
15531553

1554+
15541555
from sage.structure.sage_object import SageObject
15551556
class PointwiseInverseFunction(SageObject):
15561557
r"""
@@ -1630,4 +1631,3 @@ def pointwise_inverse(self):
16301631
True
16311632
"""
16321633
return self._pointwise_inverse
1633-

src/sage/rings/ideal.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,12 +1847,8 @@ def FieldIdeal(R):
18471847
Multivariate Polynomial Ring in x1, x2, x3, x4 over Finite
18481848
Field in alpha of size 2^4
18491849
"""
1850-
18511850
q = R.base_ring().order()
1852-
18531851
import sage.rings.infinity
18541852
if q is sage.rings.infinity.infinity:
18551853
raise TypeError("Cannot construct field ideal for R.base_ring().order()==infinity")
1856-
1857-
return R.ideal([x**q - x for x in R.gens() ])
1858-
1854+
return R.ideal([x**q - x for x in R.gens()])

src/sage/rings/polynomial/msolve.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def to_poly(p, d=1, *, upol=PolynomialRing(base, 't')):
288288
variety = []
289289
for rt in elim_roots:
290290
den_of_rt = den(rt)
291-
point = [-p(rt)/den_of_rt for p in param]
291+
point = [-p(rt) / den_of_rt for p in param]
292292
if len(param) != len(vars):
293293
point.append(rt)
294294
assert len(point) == len(vars)
@@ -311,4 +311,3 @@ def to_poly(p, d=1, *, upol=PolynomialRing(base, 't')):
311311
for point in l]
312312

313313
return [KeyConvertingDict(out_ring, zip(vars, point)) for point in variety]
314-

src/sage/rings/polynomial/multi_polynomial_ideal.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5458,4 +5458,3 @@ def __richcmp__(self, other, op):
54585458
return not (contained and contains)
54595459
else: # remaining case <
54605460
return contained and not contains
5461-

src/sage/rings/polynomial/polynomial_quotient_ring_element.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,4 +737,3 @@ def rational_reconstruction(self, *args, **kwargs):
737737
R = m.parent()
738738
f = R(self._polynomial)
739739
return f.rational_reconstruction(m, *args, **kwargs)
740-

src/sage/rings/tate_algebra.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,4 +1295,3 @@ def is_integral_domain(self, proof=True):
12951295
True
12961296
"""
12971297
return True
1298-

0 commit comments

Comments
 (0)