Skip to content

Commit

Permalink
gh-35091: fix and activate W391 in pyx files
Browse files Browse the repository at this point in the history
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes #1234" use "Introduce new method to
calculate 1+1"
-->
### 📚 Description


Fixes #34929

Activate the check for pycodestyle W391 in pyx files

<!-- Describe your changes here in detail -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If it resolves an open issue, please link to the issue here. For
example "Closes #1337" -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [x] I have made sure that the title is self-explanatory and the
description concisely explains the PR.
- [x] I have linked an issue or discussion.

### ⌛ Dependencies
<!-- List all open pull requests that this PR logically depends on -->
<!--
- #xyz: short description why this is a dependency
- #abc: ...
-->
    
URL: #35091
Reported by: Frédéric Chapoton
Reviewer(s): Edgar Costa
  • Loading branch information
Release Manager committed Mar 17, 2023
2 parents b0df140 + 71925b9 commit b220333
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

1 change: 0 additions & 1 deletion src/sage/algebras/fusion_rings/poly_tup_engine.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

1 change: 0 additions & 1 deletion src/sage/algebras/fusion_rings/shm_managers.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

1 change: 0 additions & 1 deletion src/sage/numerical/backends/generic_backend.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

2 changes: 1 addition & 1 deletion src/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ description =
# See https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
deps = pycodestyle
commands = pycodestyle --select E111,E211,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
Expand Down

0 comments on commit b220333

Please sign in to comment.