Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
fix W391 in tests, modules, rings
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Sep 28, 2022
1 parent 4541564 commit d4eddec
Show file tree
Hide file tree
Showing 39 changed files with 4 additions and 45 deletions.
1 change: 0 additions & 1 deletion src/sage/modules/free_module.py
Expand Up @@ -8243,4 +8243,3 @@ def __richcmp__(self, other, op):
True
"""
return self.obj._echelon_matrix_richcmp(other.obj, op)

3 changes: 1 addition & 2 deletions src/sage/modules/module_functors.py
Expand Up @@ -75,7 +75,7 @@ class QuotientModuleFunctor(ConstructionFunctor):
sage: Q2 = A2 / B2
sage: q3 = Q1.an_element() + Q2.an_element()
"""
rank = 5 # ranking of functor, not rank of module
rank = 5 # ranking of functor, not rank of module

def __init__(self, relations):
"""
Expand Down Expand Up @@ -187,4 +187,3 @@ def merge(self, other):
"""
if isinstance(other, QuotientModuleFunctor):
return QuotientModuleFunctor(self._relations + other._relations)

1 change: 0 additions & 1 deletion src/sage/modules/submodule.py
Expand Up @@ -243,4 +243,3 @@ def ambient_module(self):
True
"""
return self._ambient

1 change: 0 additions & 1 deletion src/sage/modules/with_basis/cell_module.py
Expand Up @@ -473,4 +473,3 @@ def _acted_upon_(self, scalar, self_on_left=False):
# For backward compatibility
_lmul_ = _acted_upon_
_rmul_ = _acted_upon_

2 changes: 1 addition & 1 deletion src/sage/modules/with_basis/morphism.py
Expand Up @@ -1551,6 +1551,7 @@ def pointwise_inverse_function(f):
return f.pointwise_inverse()
return PointwiseInverseFunction(f)


from sage.structure.sage_object import SageObject
class PointwiseInverseFunction(SageObject):
r"""
Expand Down Expand Up @@ -1630,4 +1631,3 @@ def pointwise_inverse(self):
True
"""
return self._pointwise_inverse

6 changes: 1 addition & 5 deletions src/sage/rings/ideal.py
Expand Up @@ -1847,12 +1847,8 @@ def FieldIdeal(R):
Multivariate Polynomial Ring in x1, x2, x3, x4 over Finite
Field in alpha of size 2^4
"""

q = R.base_ring().order()

import sage.rings.infinity
if q is sage.rings.infinity.infinity:
raise TypeError("Cannot construct field ideal for R.base_ring().order()==infinity")

return R.ideal([x**q - x for x in R.gens() ])

return R.ideal([x**q - x for x in R.gens()])
3 changes: 1 addition & 2 deletions src/sage/rings/polynomial/msolve.py
Expand Up @@ -290,7 +290,7 @@ def to_poly(p, d=1, *, upol=PolynomialRing(base, 't')):
variety = []
for rt in elim_roots:
den_of_rt = den(rt)
point = [-p(rt)/den_of_rt for p in param]
point = [-p(rt) / den_of_rt for p in param]
if len(param) != len(vars):
point.append(rt)
assert len(point) == len(vars)
Expand All @@ -313,4 +313,3 @@ def to_poly(p, d=1, *, upol=PolynomialRing(base, 't')):
for point in l]

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

1 change: 0 additions & 1 deletion src/sage/rings/polynomial/multi_polynomial_ideal.py
Expand Up @@ -5458,4 +5458,3 @@ def __richcmp__(self, other, op):
return not (contained and contains)
else: # remaining case <
return contained and not contains

Expand Up @@ -737,4 +737,3 @@ def rational_reconstruction(self, *args, **kwargs):
R = m.parent()
f = R(self._polynomial)
return f.rational_reconstruction(m, *args, **kwargs)

1 change: 0 additions & 1 deletion src/sage/rings/tate_algebra.py
Expand Up @@ -1295,4 +1295,3 @@ def is_integral_domain(self, proof=True):
True
"""
return True

Expand Up @@ -552,4 +552,3 @@
)
"""

Expand Up @@ -1053,4 +1053,3 @@
645490122795799841856164638490742749440
"""

Expand Up @@ -442,4 +442,3 @@
(4) * (x + 2)^2 * (x^2 + 3)
"""

Expand Up @@ -476,4 +476,3 @@
1.73205080756887729352744634151?
"""

Expand Up @@ -260,4 +260,3 @@
Graphics3d Object
"""

Expand Up @@ -417,4 +417,3 @@
sage: g.show(edge_colors=edge_coloring(g, hex_colors=True))
"""

Expand Up @@ -289,4 +289,3 @@
mpf('2.7135204235459511323824699502438')
"""

Expand Up @@ -458,4 +458,3 @@
True
"""

Expand Up @@ -233,4 +233,3 @@
....: if p.get_values(B(u,v), convert=ZZ, tolerance=1e-3) == 1] )
"""

Expand Up @@ -559,4 +559,3 @@
45
"""

Expand Up @@ -489,4 +489,3 @@
1/2*pi - (e^(1/2*pi) - 10)*e^(-1/2*pi)
"""

Expand Up @@ -154,4 +154,3 @@
17
"""

Expand Up @@ -406,4 +406,3 @@
(x^562949953421312 + 1, 562949953421312*x^562949953421311)
"""

Expand Up @@ -179,4 +179,3 @@
bla
"""

Expand Up @@ -661,4 +661,3 @@
....: return len(D) == len (Set(D.values()))
"""

Expand Up @@ -385,4 +385,3 @@
2**n*C0 + 2**(n + 1)*n
"""

Expand Up @@ -263,4 +263,3 @@
True
"""

Expand Up @@ -216,4 +216,3 @@
[0, 1, 1, 2, 5, 14, 42, 132, 429]
"""

Expand Up @@ -58,4 +58,3 @@
<class 'sage.modules.with_basis.morphism.DiagonalModuleMorphism_with_category'>
"""

Expand Up @@ -140,4 +140,3 @@
[-1.0000000000000000 .. 1.0000000000000000]
"""

Expand Up @@ -55,4 +55,3 @@
[-0.285398163397448, -0.00524656673640445, -0.00125482109302663]
"""

Expand Up @@ -55,4 +55,3 @@
False
"""

Expand Up @@ -24,4 +24,3 @@
True
"""

Expand Up @@ -46,4 +46,3 @@
True
"""

Expand Up @@ -114,4 +114,3 @@
1/16*u^2*v^2 - 3/8*u^2*v + 7/16*u^2 + 1/8*v^2 - 1/8*v - 1/8
"""

Expand Up @@ -110,4 +110,3 @@
1/2*pi - (e^(1/2*pi) - 10)*e^(-1/2*pi)
"""

Expand Up @@ -166,4 +166,3 @@
+ 4/5*s3^3*x3^15 - 9/32*s3^2*x3^16 + 1/17*s3*x3^17
"""

Expand Up @@ -106,4 +106,3 @@
+ 21844/6081075*x^13 + O(x^15)
"""

Expand Up @@ -57,4 +57,3 @@
-sqrt(2*_C + 2*log(x))*x
"""

0 comments on commit d4eddec

Please sign in to comment.