-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLN, STYLE: remove unused variables and imports in Cython files #48290
CLN, STYLE: remove unused variables and imports in Cython files #48290
Conversation
@@ -26,6 +26,10 @@ repos: | |||
hooks: | |||
- id: codespell | |||
types_or: [python, rst, markdown] | |||
- repo: https://github.com/MarcoGorelli/cython-lint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just glancing at this, im stoked at the concept!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this have/need eyeballs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would certainly help if you're interested, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - very nice work
Great cleanup @MarcoGorelli! |
It would be interesting to know why a lot of these unused variables don't get picked up via build warnings |
I think the build warnings just pick up unreachable code |
Gcc/llvm should warn for unused variables with the flags we have (-Wunused-variable us part of -Wall). My guess is Cython is generating code that still "uses" these variables and prevents that from happening. Likely hard to fix but in an ideal would that wouldn't happen in the first place |
…as-dev#48290) * remove unused variables and imports * wip * bump to 0.1.4
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Tried putting together a little Cython linter, here's the unused variables/imports it finds. More to come, but this already cleans up quite a few things