-
Notifications
You must be signed in to change notification settings - Fork 30
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
first sketch of cython-lint workflow #204
Conversation
It might be that the workflow doesn't run until it is actually merged or something. |
yes, could be. I have to add many ignored codes too |
.github/workflows/lint.yml
Outdated
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.12"] |
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.
Not sure it matters but minimum version is 3.10 now.
Does the lint check depend on the Python version?
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.
ok. I think the cython-lint does not, but maybe ruff
checks will depend if they are added later. So let us keep a set of python versions
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.
now the lint workflow is running ; probably it will fail, let's see
now with large-scale removal of unused variables and imports. The former in particular may benefit from a careful check. |
.github/workflows/lint.yml
Outdated
|
||
- name: cython-lint | ||
run: | | ||
cython-lint --ignore=E114,E117,E127,E128,E129,E202,E221,E222,E231,E261,E262,E265,E302,E303,E306,E501,E701,E703,E711,E722,E731,E741,E743,W291,W293,W391,W605 src/ |
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 it still need all of these?
I think it is fine if there are lots of ignore code for now because they can be disabled incrementally.
It would be better if the ignore codes are in pyproject.toml though so that it works the same when running locally as in CI.
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.
Or maybe it is better to leave these here for now until most errors are fixed since we don't intend to keep all of these ignores codes.
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.
I think I only added codes that I have seen failing.
I have moved the config to pyproject.toml
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.
Although my branch here is not based on my recent fix-ups, that in particular fix W605.
I've been through all the diff and it looks good although I'll let the CI finish. |
I have rebased the branch on master, squashed the first few commits and shortened the ignore list |
Okay, looks good to me. I'll wait for CI to finish. |
I'm going to add a development workflow page to the docs and I'll mention how to run cython-lint there. We should probably arrange it so that you can do e.g. $ spin lint since |
Okay this looks good. Thanks! |
let's try to add a cython-lint checker in a workflow