diff --git a/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py b/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py index 08ea78b8ea3..b14f4e1f92a 100644 --- a/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py +++ b/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py @@ -837,14 +837,14 @@ def thwart_lemma_4_1(k, n, m, explain_construction=False): # - (1+t,t,1+t), (1,1,1), (1+t,t,t), (1,1,2), (0,0,1), (1,0,1), (0,1,1+t), # (0,1,1), (1,0,-t) points = [(1+t,t,1+t), (1,1,1), (1+t,t,t), (1,1,2), (0,0,1), (1,0,1), (0,1,1+t), (0,1,1), (1,0,-t)] - points = [[K(_) for _ in t] for t in points] # triples of K^3 + points = [[K(c) for c in t] for t in points] # triples of K^3 AG_2_3 = [] for x,y,z in points: if z != 0: - x,y,z = x/z,y/z,z/z + x, y, z = x / z, y / z, K.one() AG_2_3.append(relabel[x]+n*relabel[y]) elif y != 0: - x,y,z = x/y,y/y,z + x, y = x / y, K.one() AG_2_3.append(q**2+relabel[x]) else: AG_2_3.append(q**2+q) diff --git a/src/sage/combinat/skew_tableau.py b/src/sage/combinat/skew_tableau.py index 44189013d5c..6997cd396f9 100644 --- a/src/sage/combinat/skew_tableau.py +++ b/src/sage/combinat/skew_tableau.py @@ -1042,10 +1042,10 @@ def backward_slide(self, corner=None): # -1, which doesn't trigger the conditional if P_left > P_up: new_st[i][j] = P_left - i, j = (i, j - 1) + j = j - 1 else: # if they are equal, we slide up new_st[i][j] = P_up - i, j = (i - 1, j) + i = i - 1 # We don't need to reset the intermediate cells inside the loop # because the conditional above will continue to overwrite it until # the while loop terminates. We do need to reset it at the end. diff --git a/src/sage/interacts/library.py b/src/sage/interacts/library.py index a58a0748477..3ce16952a74 100644 --- a/src/sage/interacts/library.py +++ b/src/sage/interacts/library.py @@ -925,7 +925,7 @@ def bisection_method(title, f, interval, d, maxn): maxn: IntSlider(value=10, description='max iterations', max=15) """ def _bisection_method(f, a, b, maxn, eps): - intervals = [(a,b)] + intervals = [(a, b)] round = 1 two = float(2) while True: @@ -938,12 +938,12 @@ def _bisection_method(f, a, b, maxn, eps): if abs(fc) < eps: return c, intervals if fa*fc < 0: - a, b = a, c + b = c elif fc*fb < 0: - a, b = c, b + a = c else: raise ValueError("f must have a sign change in the interval (%s,%s)" % (a,b)) - intervals.append((a,b)) + intervals.append((a, b)) round += 1 return c, intervals diff --git a/src/tox.ini b/src/tox.ini index 81822de97cf..4ca4f5bd283 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -311,7 +311,7 @@ passenv = RUFF_OUTPUT_FORMAT # 1 F402 [ ] Import `factor` from line 259 shadowed by loop variable # 1 PLC0208 [*] Use a sequence type instead of a `set` when iterating over values # -commands = ruff check --ignore E402,E721,E731,E741,E742,E743,F401,F402,F403,F405,F821,F841,I001,PLC0206,PLC0208,PLC2401,PLC3002,PLE0302,PLR0124,PLR0402,PLR0911,PLR0912,PLR0913,PLR0915,PLR1704,PLR1711,PLR1714,PLR1716,PLR1736,PLR2004,PLR5501,PLW0120,PLW0127,PLW0211,PLW0602,PLW0603,PLW0642,PLW1508,PLW1510,PLW2901,PLW3301 {posargs:{toxinidir}/sage/} +commands = ruff check --ignore E402,E721,E731,E741,E742,E743,F401,F402,F403,F405,F821,F841,I001,PLC0206,PLC0208,PLC2401,PLC3002,PLE0302,PLR0124,PLR0402,PLR0911,PLR0912,PLR0913,PLR0915,PLR1704,PLR1711,PLR1714,PLR1716,PLR1736,PLR2004,PLR5501,PLW0120,PLW0211,PLW0602,PLW0603,PLW0642,PLW1508,PLW1510,PLW2901,PLW3301 {posargs:{toxinidir}/sage/} [flake8] rst-roles =