From 81bec94c3616153279d2fc926d8d80c8080b8b6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Sun, 22 Jan 2023 09:57:25 +0100 Subject: [PATCH] fix and activate W391 in cython files --- src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx | 1 - src/sage/algebras/fusion_rings/poly_tup_engine.pyx | 1 - src/sage/algebras/fusion_rings/shm_managers.pyx | 1 - src/sage/numerical/backends/generic_backend.pyx | 1 - src/tox.ini | 2 +- 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx b/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx index a482c0c4fc1..02dcd786458 100644 --- a/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx +++ b/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx @@ -531,4 +531,3 @@ cdef pent_verify(factory, tuple mp_params): feq_verif(factory, worker_results, fvars, Nk_ij, id_anyon, nonuple) if i % 50000000 == 0 and i and verbose: print("{:5d}m equations checked... {} potential misses so far...".format(i // 1000000, len(worker_results))) - diff --git a/src/sage/algebras/fusion_rings/poly_tup_engine.pyx b/src/sage/algebras/fusion_rings/poly_tup_engine.pyx index ac465e14a77..ebf3ea8aa8c 100644 --- a/src/sage/algebras/fusion_rings/poly_tup_engine.pyx +++ b/src/sage/algebras/fusion_rings/poly_tup_engine.pyx @@ -576,4 +576,3 @@ cpdef tuple poly_tup_sortkey(tuple eq_tup): key.append(-exp._data[2*i]) key.append(exp._data[2*i+1]) return tuple(key) - diff --git a/src/sage/algebras/fusion_rings/shm_managers.pyx b/src/sage/algebras/fusion_rings/shm_managers.pyx index 91aba7ba59f..633dd464845 100644 --- a/src/sage/algebras/fusion_rings/shm_managers.pyx +++ b/src/sage/algebras/fusion_rings/shm_managers.pyx @@ -773,4 +773,3 @@ def make_FvarsHandler(n, field, idx_map, init_data): sage: f.shutdown_worker_pool() """ return FvarsHandler(n, field, idx_map, init_data=init_data) - diff --git a/src/sage/numerical/backends/generic_backend.pyx b/src/sage/numerical/backends/generic_backend.pyx index 64d47f7bc2b..40689cacad6 100644 --- a/src/sage/numerical/backends/generic_backend.pyx +++ b/src/sage/numerical/backends/generic_backend.pyx @@ -1819,4 +1819,3 @@ cpdef GenericBackend get_solver(constraint_generation = False, solver = None, ba else: raise ValueError("'solver' should be set to 'GLPK', 'GLPK/exact', 'Coin', 'CPLEX', 'CVXOPT', 'Gurobi', 'PPL', 'SCIP', 'InteractiveLP', None (in which case the default one is used), or a callable.") - diff --git a/src/tox.ini b/src/tox.ini index 06777c93ac2..14f51843c9f 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -116,7 +116,7 @@ description = # See https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes deps = pycodestyle commands = pycodestyle --select E111,E306,E401,E701,E702,E703,W291,W391,W605,E711,E712,E713,E721,E722 {posargs:{toxinidir}/sage/} - pycodestyle --select E111,E306,E401,E703,W605,E712,E713,E721,E722 --filename *.pyx {posargs:{toxinidir}/sage/} + pycodestyle --select E111,E306,E401,E703,W391,W605,E712,E713,E721,E722 --filename *.pyx {posargs:{toxinidir}/sage/} [pycodestyle] max-line-length = 160