Skip to content

Commit 04bbe60

Browse files
committed
fix all remaining E251 warnings
1 parent 443b754 commit 04bbe60

File tree

7 files changed

+43
-43
lines changed

7 files changed

+43
-43
lines changed

src/sage/dynamics/arithmetic_dynamics/endPN_automorphism_group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def automorphism_group_QQ_fixedpoints(rational_function, return_functions=False,
126126
else:
127127
elements = [matrix(F, 2, [1,0,0,1])]
128128

129-
rational_roots = h.roots(multiplicities = False)
129+
rational_roots = h.roots(multiplicities=False)
130130

131131
min_poly = 1
132132

@@ -743,7 +743,7 @@ def automorphism_group_QQ_CRT(rational_function, prime_lower_bound=4, return_fun
743743
# compute automorphisms mod p
744744
phi_p = f.change_ring(GF(p))/g.change_ring(GF(p))
745745
sorted_automorphisms = automorphism_group_FF(phi_p)
746-
sorted_automorphisms.sort(key = PGL_order)
746+
sorted_automorphisms.sort(key=PGL_order)
747747
orders = [PGL_order(A) for A in sorted_automorphisms]
748748

749749
automorphisms.append(sorted_automorphisms)

src/sage/dynamics/arithmetic_dynamics/projective_ds.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4519,7 +4519,7 @@ def preperiodic_points(self, m, n, **kwds):
45194519
# we now deform by a parameter t
45204520
T = R['t']
45214521
t = T.gens()[0]
4522-
Pt = ProjectiveSpace(N-1, R=T, names = [str(i) for i in CR.gens()])
4522+
Pt = ProjectiveSpace(N-1, R=T, names=[str(i) for i in CR.gens()])
45234523
deformed_polys = [poly + t*Pt.gens()[-1]**d for poly in new_f.defining_polynomials()[:-1]]
45244524
deformed_polys += [new_f.defining_polynomials()[-1]]
45254525
f_deformed = DynamicalSystem(deformed_polys)
@@ -4869,7 +4869,7 @@ def periodic_points(self, n, minimal=True, formal=False, R=None, algorithm='vari
48694869
# we now deform by a parameter t
48704870
T = R['t']
48714871
t = T.gens()[0]
4872-
Pt = ProjectiveSpace(N-1, R=T, names = [str(i) for i in CR.gens()])
4872+
Pt = ProjectiveSpace(N-1, R=T, names=[str(i) for i in CR.gens()])
48734873
deformed_polys = [poly + t*Pt.gens()[-1]**d for poly in new_f.defining_polynomials()[:-1]]
48744874
deformed_polys += [new_f.defining_polynomials()[-1]]
48754875
f_deformed = DynamicalSystem(deformed_polys)
@@ -5694,7 +5694,7 @@ def sigma_invariants(self, n, formal=False, embedding=None, type='point',
56945694
# we now deform by a parameter t
56955695
T = base_ring['k']
56965696
k = T.gens()[0]
5697-
Pt = ProjectiveSpace(N, R=T, names = [str(i) for i in CR.gens()])
5697+
Pt = ProjectiveSpace(N, R=T, names=[str(i) for i in CR.gens()])
56985698
deformed_polys = [poly + k*Pt.gens()[-1]**d for poly in new_f.defining_polynomials()[:-1]]
56995699
deformed_polys += [new_f.defining_polynomials()[-1]]
57005700
f_deformed = DynamicalSystem(deformed_polys)
@@ -6331,7 +6331,7 @@ def _is_preperiodic(self, P, err=0.1, return_period=False):
63316331

63326332
# we calculate the canonical height without considering
63336333
# if the domain is a subscheme
6334-
h = f.canonical_height(P, error_bound = err)
6334+
h = f.canonical_height(P, error_bound=err)
63356335
# we know canonical height 0 if and only if preperiodic
63366336
# however precision issues can occur so we can only tell *not* preperiodic
63376337
# if the value is larger than the error

src/sage/dynamics/arithmetic_dynamics/wehlerK3.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ def degenerate_fibers(self):
815815
for n in range(3):
816816
affvars = list(R0.gens())
817817
del affvars[n]
818-
R1 = PolynomialRing(K, 2, affvars, order = 'lex')
818+
R1 = PolynomialRing(K, 2, affvars, order='lex')
819819
mapvars = list(R1.gens())
820820
mapvars.insert(n,1)
821821
phi1 = R0.hom(mapvars, R1)
@@ -846,7 +846,7 @@ def degenerate_fibers(self):
846846
for n in range(3):
847847
affvars = list(R0.gens())
848848
del affvars[n]
849-
R1 = PolynomialRing(K, 2, affvars, order = 'lex')
849+
R1 = PolynomialRing(K, 2, affvars, order='lex')
850850
mapvars = list(R1.gens())
851851
mapvars.insert(n, 1)
852852
phi1 = R0.hom(mapvars,R1)
@@ -867,7 +867,7 @@ def degenerate_fibers(self):
867867
return [xFibers,yFibers]
868868

869869
@cached_method
870-
def degenerate_primes(self,check = True):
870+
def degenerate_primes(self,check=True):
871871
r"""
872872
Determine which primes `p` self has degenerate fibers over `GF(p)`.
873873
@@ -1179,7 +1179,7 @@ def sigmaX(self, P, **kwds):
11791179

11801180
#Defines the ideal whose solution gives `(s0, s1)` and the two points
11811181
#on the fiber
1182-
RR = PolynomialRing(BR, 5,'s0, s1, z0, z1, z2',order = 'lex')
1182+
RR = PolynomialRing(BR, 5,'s0, s1, z0, z1, z2',order='lex')
11831183
s0, s1, z0, z1, z2 = RR.gens()
11841184
I = RR.ideal([RR(T[0]),
11851185
RR(T[1]),
@@ -1189,7 +1189,7 @@ def sigmaX(self, P, **kwds):
11891189
RR(T[7]) - (P[1][1]*z2 + P[1][2]*z1)])
11901190

11911191
#Find the points
1192-
SS = PolynomialRing(BR, 4,'s, z0, z1, z2', order = 'lex')
1192+
SS = PolynomialRing(BR, 4,'s, z0, z1, z2', order='lex')
11931193
s, z0, z1, z2 = SS.gens()
11941194
phi = RR.hom([s, 1, z0, z1, z2], SS)
11951195
J = phi(I)
@@ -1234,7 +1234,7 @@ def sigmaX(self, P, **kwds):
12341234
SS(newT[7]) - (P[1][1]*z2 + P[1][2]*z1)])
12351235

12361236
#Find the points
1237-
SSS = PolynomialRing(BR, 3, 'z0, z1, z2', order = 'lex')
1237+
SSS = PolynomialRing(BR, 3, 'z0, z1, z2', order='lex')
12381238
z0,z1,z2 = SSS.gens()
12391239
phi = SS.hom([0, z0, z1, z2], SSS)
12401240
J2 = phi(II)
@@ -1248,7 +1248,7 @@ def sigmaX(self, P, **kwds):
12481248
[a, b, c] = [V[0][z0], V[0][z1], V[0][z2]]
12491249

12501250
if len(V) == 0 or [a,b,c] == [0, 0, 0]:
1251-
SS = PolynomialRing(BR, 3, 'z0, z1, z2', order = 'lex')
1251+
SS = PolynomialRing(BR, 3, 'z0, z1, z2', order='lex')
12521252
z0,z1,z2 = SS.gens()
12531253
phi = RR.hom([1, 0, z0, z1, z2], SS)
12541254
J = phi(I)
@@ -1430,7 +1430,7 @@ def sigmaY(self,P, **kwds):
14301430
RR(T[6]) - (P[0][0]*z2 + P[0][2]*z0),
14311431
RR(T[7]) - (P[0][1]*z2 + P[0][2]*z1)])
14321432
#Find the points
1433-
SS = PolynomialRing(BR, 4, 's, z0, z1, z2', order = 'lex')
1433+
SS = PolynomialRing(BR, 4, 's, z0, z1, z2', order='lex')
14341434
s, z0, z1, z2 = SS.gens()
14351435
phi = RR.hom([s, 1, z0, z1, z2], SS)
14361436
J = phi(I)
@@ -1486,7 +1486,7 @@ def sigmaY(self,P, **kwds):
14861486
if len(V) == 1:
14871487
[a, b, c] = [V[0][z0], V[0][z1], V[0][z2]]
14881488
if len(V) == 0 or [a,b,c] == [0, 0, 0]:
1489-
SS = PolynomialRing(BR, 3, 'z0, z1, z2', order = 'lex')
1489+
SS = PolynomialRing(BR, 3, 'z0, z1, z2', order='lex')
14901490
z0,z1,z2 = SS.gens()
14911491
phi = RR.hom([1, 0, z0, z1, z2], SS)
14921492
J = phi(I)
@@ -1584,7 +1584,7 @@ def psi(self,a, **kwds):
15841584
kwds.update({"check":False})
15851585
return self.sigmaX(A, **kwds)
15861586

1587-
def lambda_plus(self, P, v, N, m, n, prec = 100):
1587+
def lambda_plus(self, P, v, N, m, n, prec=100):
15881588
r"""
15891589
Evaluates the local canonical height plus function of Call-Silverman at
15901590
the place ``v`` for ``P`` with ``N`` terms of the series.
@@ -1744,7 +1744,7 @@ def lambda_minus(self, P, v, N, m, n, prec=100):
17441744
local_height = beta*R((PK[1][i]/PK[1][n]).abs()).log() - R((PK[0][j]/PK[0][m]).abs()).log()
17451745
for e in range(N):
17461746
#Take the next iterate
1747-
Q = W.psi(PK, check = False)
1747+
Q = W.psi(PK, check=False)
17481748
L = [x.abs() for x in list(Q[0])]
17491749
l = L.index(max(L))
17501750
L = [y.abs() for y in list(Q[1])]

src/sage/dynamics/complex_dynamics/mandel_julia.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -206,21 +206,21 @@ def mandelbrot_plot(f=None, **kwds):
206206

207207
from ipywidgets.widgets import FloatSlider, IntSlider, ColorPicker, interact
208208
widgets = dict(
209-
x_center = FloatSlider(min=-1.0, max=1.0, step=EPS,
209+
x_center=FloatSlider(min=-1.0, max=1.0, step=EPS,
210210
value=x_center, description="Real center"),
211-
y_center = FloatSlider(min=-1.0, max=1.0, step=EPS,
211+
y_center=FloatSlider(min=-1.0, max=1.0, step=EPS,
212212
value=y_center, description="Imag center"),
213-
image_width = FloatSlider(min=EPS, max=4.0, step=EPS,
213+
image_width=FloatSlider(min=EPS, max=4.0, step=EPS,
214214
value=image_width, description="Width"),
215-
max_iteration = IntSlider(min=0, max=1000,
215+
max_iteration=IntSlider(min=0, max=1000,
216216
value=max_iteration, description="Iterations"),
217-
pixel_count = IntSlider(min=10, max=1000,
217+
pixel_count=IntSlider(min=10, max=1000,
218218
value=pixel_count, description="Pixels"),
219-
level_sep = IntSlider(min=1, max=20,
219+
level_sep=IntSlider(min=1, max=20,
220220
value=level_sep, description="Color sep"),
221-
color_num = IntSlider(min=1, max=100,
221+
color_num=IntSlider(min=1, max=100,
222222
value=number_of_colors, description="# Colors"),
223-
base_color = ColorPicker(value=Color(base_color).html_color(),
223+
base_color=ColorPicker(value=Color(base_color).html_color(),
224224
description="Base color"),
225225
)
226226

@@ -729,25 +729,25 @@ def julia_plot(f=None, **kwds):
729729
from ipywidgets.widgets import FloatSlider, IntSlider, \
730730
ColorPicker, interact
731731
widgets = dict(
732-
c_real = FloatSlider(min=-2.0, max=2.0, step=EPS,
732+
c_real=FloatSlider(min=-2.0, max=2.0, step=EPS,
733733
value=c_real, description="Real c"),
734-
c_imag = FloatSlider(min=-2.0, max=2.0, step=EPS,
734+
c_imag=FloatSlider(min=-2.0, max=2.0, step=EPS,
735735
value=c_imag, description="Imag c"),
736-
x_center = FloatSlider(min=-1.0, max=1.0, step=EPS,
736+
x_center=FloatSlider(min=-1.0, max=1.0, step=EPS,
737737
value=x_center, description="Real center"),
738-
y_center = FloatSlider(min=-1.0, max=1.0, step=EPS,
738+
y_center=FloatSlider(min=-1.0, max=1.0, step=EPS,
739739
value=y_center, description="Imag center"),
740-
image_width = FloatSlider(min=EPS, max=4.0, step=EPS,
740+
image_width=FloatSlider(min=EPS, max=4.0, step=EPS,
741741
value=image_width, description="Width"),
742-
max_iteration = IntSlider(min=0, max=1000,
742+
max_iteration=IntSlider(min=0, max=1000,
743743
value=max_iteration, description="Iterations"),
744-
pixel_count = IntSlider(min=10, max=1000,
744+
pixel_count=IntSlider(min=10, max=1000,
745745
value=pixel_count, description="Pixels"),
746-
level_sep = IntSlider(min=1, max=20,
746+
level_sep=IntSlider(min=1, max=20,
747747
value=level_sep, description="Color sep"),
748-
color_num = IntSlider(min=1, max=100,
748+
color_num=IntSlider(min=1, max=100,
749749
value=number_of_colors, description="# Colors"),
750-
base_color = ColorPicker(value=base_color.html_color(),
750+
base_color=ColorPicker(value=base_color.html_color(),
751751
description="Base color"),
752752
)
753753
if mandelbrot:

src/sage/modules/free_module.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,7 +2592,7 @@ def basis_matrix(self, ring=None):
25922592
except AttributeError:
25932593
MAT = sage.matrix.matrix_space.MatrixSpace(self.coordinate_ring(),
25942594
len(self.basis()), self.degree(),
2595-
sparse = self.is_sparse())
2595+
sparse=self.is_sparse())
25962596
if self.is_ambient():
25972597
A = MAT.identity_matrix()
25982598
else:
@@ -5378,7 +5378,7 @@ def _dense_module(self):
53785378
sage: M is S._dense_module()
53795379
True
53805380
"""
5381-
return FreeModule(base_ring=self.base_ring(), rank = self.rank(), sparse=False)
5381+
return FreeModule(base_ring=self.base_ring(), rank=self.rank(), sparse=False)
53825382

53835383
def _sparse_module(self):
53845384
"""
@@ -5394,7 +5394,7 @@ def _sparse_module(self):
53945394
sage: M._sparse_module() is S
53955395
True
53965396
"""
5397-
return FreeModule(base_ring=self.base_ring(), rank = self.rank(), sparse=True)
5397+
return FreeModule(base_ring=self.base_ring(), rank=self.rank(), sparse=True)
53985398

53995399
def echelonized_basis_matrix(self):
54005400
"""
@@ -6683,7 +6683,7 @@ def _echelonized_basis(self, ambient, basis):
66836683
# Return the first rank rows (i.e., the nonzero rows).
66846684
d = self._denominator(basis)
66856685
MAT = sage.matrix.matrix_space.MatrixSpace(
6686-
ambient.base_ring(), len(basis), ambient.degree(), sparse = ambient.is_sparse())
6686+
ambient.base_ring(), len(basis), ambient.degree(), sparse=ambient.is_sparse())
66876687
if d != 1:
66886688
basis = [x*d for x in basis]
66896689
A = MAT(basis)
@@ -7051,7 +7051,7 @@ def user_to_echelon_matrix(self):
70517051
rows = sum([self.echelon_coordinates(b,check=False) for b in self.basis()], [])
70527052
M = sage.matrix.matrix_space.MatrixSpace(self.base_ring().fraction_field(),
70537053
self.dimension(),
7054-
sparse = self.is_sparse())
7054+
sparse=self.is_sparse())
70557055
self.__user_to_echelon_matrix = M(rows)
70567056
return self.__user_to_echelon_matrix
70577057

src/sage/modules/submodule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def matrix(self):
165165
"""
166166
from sage.matrix.matrix_space import MatrixSpace
167167
MAT = MatrixSpace(self.base_ring(), len(self.gens()), self.degree(),
168-
sparse = self.is_sparse())
168+
sparse=self.is_sparse())
169169
A = MAT(self.gens())
170170
A.set_immutable()
171171
return A

src/sage/modules/with_basis/morphism.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ def cokernel_basis_indices(self):
11271127
raise NotImplementedError("cokernel_basis_indices implemented only for morphisms with a finite dimensional codomain")
11281128
return [i for i in self.codomain().basis().keys() if self._inverse_on_support(i) is None]
11291129

1130-
def cokernel_projection(self, category = None):
1130+
def cokernel_projection(self, category=None):
11311131
"""
11321132
Return a projection on the co-kernel of ``self``.
11331133
@@ -1517,7 +1517,7 @@ def __invert__(self):
15171517
"""
15181518
return self.codomain().module_morphism(
15191519
diagonal=pointwise_inverse_function(self._diagonal),
1520-
codomain=self.domain(), category = self.category_for())
1520+
codomain=self.domain(), category=self.category_for())
15211521

15221522

15231523
def pointwise_inverse_function(f):

0 commit comments

Comments
 (0)