Repository navigation
Conversation
cython-lint 0.22.0 now reports unused cdef locals in inline functions defined in .pxd files, so the Lint job fails on main with fmpz.pxd:25:16: 'w' defined but unused. The variable has been unused since the from_bytes/to_bytes conversion rewrite (f349183).
Collaborator
|
You can just do this in the other PR. We don't need separate PRs and CI runs for something like this. |
Author
|
Thanks, moved into #433. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Lint workflow installs cython-lint unpinned (
uv pip install cython-lint --upgrade), and cython-lint 0.22.0 (released 2026-10-07) fails onmain:This makes the Lint job red on every PR opened since then (for example #433, which only touches
.pyifiles).Cause.
fmpz_set_pylonginsrc/flint/types/fmpz.pxddeclarescdef ulong wbut never uses it. It has been unused since thefrom_bytes/to_bytesrewrite in f349183; thewinulong_from_little_endianjust above is that function's own local. cython-lint 0.22.0 now checks unused locals in inline functions defined in.pxdfiles, which earlier releases did not report.Fix. Delete the declaration.
Validation (Python 3.12, as in the Lint job):
main(cb37c77)cython -3 -I src(Cython 3.3.0) still compilesfmpz.pyx,fmpq.pyxandfmpz_poly.pyx, which cimportfmpz.pxd. I did not run the full build or the test suite locally; the declaration was dead, so no generated code that runs changes.