Skip to content

Commit 3afc2f4

Browse files
committed
referee's suggestions done
1 parent 0a49510 commit 3afc2f4

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

src/sage/combinat/crystals/fast_crystals.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ def _type_bc_init(self, l1, l2):
220220
4
221221
"""
222222
if self._cartan_type[0] == 'B':
223-
m1, m2 = [l1+l2, l1-l2]
223+
m1, m2 = l1 + l2, l1 - l2
224224
else:
225-
m1, m2 = [l1, l2]
225+
m1, m2 = l1, l2
226226
for b in range(m2,-1,-1):
227227
for a in range(m1,m2-1,-1):
228228
for c in range(b,a+1):

src/sage/combinat/words/finite_word.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,9 +1684,9 @@ def reduced_rauzy_graph(self, n):
16841684
g.allow_loops(True)
16851685
g.allow_multiple_edges(True)
16861686
for v in l:
1687-
i, = g.neighbors_in(v)
1688-
o, = g.neighbors_out(v)
1689-
g.add_edge(i, o, g.edge_label(i, v)[0]*g.edge_label(v, o)[0])
1687+
i = next(g.neighbors_in_iterator(v))
1688+
o = next(g.neighbors_out_iterator(v))
1689+
g.add_edge(i, o, g.edge_label(i, v)[0] * g.edge_label(v, o)[0])
16901690
g.delete_vertex(v)
16911691
return g
16921692

src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,8 +1215,8 @@ def ideal_endpoints(self):
12151215
"""
12161216
start = self._start.coordinates()
12171217
end = self._end.coordinates()
1218-
x1, x2 = [real(k) for k in [start, end]]
1219-
y1, y2 = [imag(k) for k in [start, end]]
1218+
x1, x2 = real(start), real(end)
1219+
y1, y2 = imag(start), imag(end)
12201220
M = self._model
12211221
# infinity is the first endpoint, so the other ideal endpoint
12221222
# is just the real part of the second coordinate

src/sage/modules/free_quadratic_module_integer_symmetric.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def IntegralLatticeDirectSum(Lattices, return_embeddings=False):
325325
326326
sage: L1 = IntegralLattice(2 * matrix.identity(2), [[1/2, 1/2]])
327327
sage: L2 = IntegralLattice("A3", [[1, 1, 2]]) # needs sage.graphs
328-
sage: L, phi = IntegralLatticeDirectSum([L1, L2], True) # needs sage.graphs
328+
sage: L, phi = IntegralLatticeDirectSum([L1, L2], True) # needs sage.graphs
329329
sage: L # needs sage.graphs
330330
Lattice of degree 5 and rank 2 over Integer Ring
331331
Basis matrix:
@@ -345,7 +345,7 @@ def IntegralLatticeDirectSum(Lattices, return_embeddings=False):
345345
dims = [L_i.dimension() for L_i in Lattices]
346346
degrees = [L_i.degree() for L_i in Lattices]
347347
degree_tot = sum(degrees)
348-
sum_degree = [sum(degrees[:i]) for i in range(N+1)]
348+
sum_degree = [sum(degrees[:i]) for i in range(N + 1)]
349349
inner_product_list = [copy(L_i.inner_product_matrix()) for L_i in Lattices]
350350
IM = matrix.block_diagonal(inner_product_list)
351351
ambient = FreeQuadraticModule(ZZ,

src/sage/rings/invariants/reconstruction.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def binary_quintic_coefficients_from_invariants(invariants, K=None, invariant_ch
186186
If the invariant `M` vanishes, then the coefficients are computed in a
187187
different way::
188188
189-
sage: A, B, C = [3, 1, 2]
189+
sage: A, B, C = 3, 1, 2
190190
sage: M = 2*A*B - 3*C
191191
sage: M
192192
0
@@ -265,7 +265,7 @@ def binary_quintic_coefficients_from_invariants(invariants, K=None, invariant_ch
265265
M = 2*A*B - 3*C
266266
N = K(2)**-1 * (A*C-B**2)
267267
R2 = -K(2)**-1 * (A*N**2-2*B*M*N+C*M**2)
268-
scale = [1,1,1,1,1,1]
268+
scale = [1, 1, 1, 1, 1, 1]
269269
from sage.arith.misc import binomial
270270
from sage.misc.functional import sqrt
271271
if len(invariants) == 3:
@@ -274,8 +274,8 @@ def binary_quintic_coefficients_from_invariants(invariants, K=None, invariant_ch
274274
else:
275275
# if R2 is not a square, we scale the invariants in a suitable way
276276
# so that the 'new' R2 is a square
277-
A, B, C = [R2*A, R2**2*B, R2**3*C]
278-
M, N = [R2**3*M, R2**4*N]
277+
A, B, C = R2 * A, R2**2 * B, R2**3 * C
278+
M, N = R2**3 * M, R2**4 * N
279279
R = R2**5
280280
elif len(invariants) == 4:
281281
if invariants[3]**2 != R2:

src/sage/schemes/curves/affine_curve.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,7 @@ def extension(self):
15921592
t = 0
15931593
# loop through the patches and blow up each until no patch has singular points
15941594
while not_resolved:
1595-
BC, t_maps, pi, pts = [res[t][0], res[t][1], res[t][2], res[t][3]]
1595+
BC, t_maps, pi, pts = res[t][0], res[t][1], res[t][2], res[t][3]
15961596
# check if there are any singular points in this patch
15971597
if not pts:
15981598
t += 1
@@ -1762,7 +1762,7 @@ class AffinePlaneCurve_field(AffinePlaneCurve, AffineCurve_field):
17621762
"""
17631763
_point = AffinePlaneCurvePoint_field
17641764

1765-
def has_vertical_asymptote(self):
1765+
def has_vertical_asymptote(self) -> bool:
17661766
"""
17671767
Check if the curve is not a line and has vertical asymptotes.
17681768
@@ -1782,7 +1782,7 @@ def has_vertical_asymptote(self):
17821782
dxy = f.coefficient({y: dy}).degree()
17831783
return dxy > 0 and f.degree() > 1
17841784

1785-
def is_vertical_line(self):
1785+
def is_vertical_line(self) -> bool:
17861786
"""
17871787
Check if the curve is a vertical line.
17881788

0 commit comments

Comments
 (0)