-
Notifications
You must be signed in to change notification settings - Fork 36.2k
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
script, test: python linter flake8 E275 fixup, update dependencies #26257
script, test: python linter flake8 E275 fixup, update dependencies #26257
Conversation
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.
Approach ACK - this has been on my to-do list too. I prefer fixing the issue as opposed to dropping rules.
5af6ee6
to
395519b
Compare
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.
ACK 395519b
Nice to have lint-python.py
run without all those warnings. Non-controversial change imo, could have put a space instead of removing the parenthesis but this is more pythonic so I'm in favour. We do have instances of assert (...)
left where the parentheses could be removed but it's orthogonal and not worth the change on its own, imo.
Concept ACK |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
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.
Concept ACK
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.
ACK 395519b
CI is red |
Also, not sure if we should enforce this whitespace, given that no other whitespace is enforced. |
395519b
to
a56ee66
Compare
Rebased and updated with latest fixups (CI was green on the last push with 2 ACKs here, so I suppose it was restarted to verify with the latest merges). |
As mentioned in the pull description, another option would be to drop the E275 rule. |
CI is still red. To me it seems odd to enforce this whitespace but no other. If you want to enforce whitespace, it might be best to discuss in a separate pull, and then for all whitespace, unless there is a reason to do it for only this one. |
a56ee66
to
fc3ca6f
Compare
Rebased and CI is green. The intent is only to have our python linter pass on CI and locally with the current version; E275 seems to be part of current flake8 (https://www.flake8rules.com/rules/E275.html) unless we opt out of it. Like @stickies-v, I mildly prefer fixing the issue with more pythonic code rather than dropping rules. |
~0 Is there a particular reason this change is broken into commits per-directory? Seems like an odd way to break it up. |
I don't think suggesting the use of a commit message that clearly explains a change, rather than multiple vauge messages, is a nit. The message from 634cb38: |
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.
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.
re-ACK fc3ca6f
However, I think fanquake's suggestion to make the commit messages more helpful is on point, so I would support doing that first. I hereby commit to quickly re-ACK once that's done (assuming no other big changes).
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.
ACK fc3ca6f
Tested locally the versions modified in 04_install
and reviewed the changes in the code, most are similar. I agree on squashing and making the message more helpful, happy to re-ack if you address it!
fc3ca6f
to
1e5e87c
Compare
Rebased and addressed feedback. Opened #26801 as an alternative. I mildly prefer this version for its more pythonic code. |
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.
ACK 1e5e87c
I also prefer this over #26801. |
It is helpful to be able to run the python linter locally to review PRs and check local diffs and work. Fix the errors raised by
./test/lint/lint-python.py
when run locally with flake8 5.0.4, which enforces rule E275 more strictly than previous versions, and update our python linter CI dependencies.