-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
STYLE enable ruff PLW2901 #51797
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
STYLE enable ruff PLW2901 #51797
Conversation
ErdiTk
commented
Mar 5, 2023
- closes STYLE enable ruff PLW2901 #51708
- All code checks passed.
- Added relative entries in "to be gradually enabled" inside pyproject.toml.
… gradually. Currently removed 10 errors generated outside the main folders.
# Conflicts: # doc/source/whatsnew/v2.1.0.rst
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.
thanks for working on this
to be honest, I'm no longer sold on enabling this code, having seen the changes it entails it probably makes things less clear more often than not. this is my fault for having suggested the issue, sorry about that
the line_stripped
change one is nice though, that's probably an improvement
I'd suggest we:
- keep the
line_stripped
change - revert the rest
and then we can get this in
Hi @MarcoGorelli, I just pushed an update of the PR. I renamed all the variables by setting a more intuitive variable name. Please let me know if it's fine for you. In that case I will continue like this also for the other sections. |
Oh no problem, no need to say sorry. To be fair I should've thought a bit more on the variable names. Will wait for a feedback on the last push before continuing. |
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.
thanks for updating, this does look better!
just left a couple of comments
looks like most tests are failing, could you check what it might be please? |
The line "pandas/core/*" was repeated twice in the pyproject.toml file. I didn't see it in the merge conflict. Now should be fine. |
The error seems to be connected to my changes in the |
Hi @MarcoGorelli, I think I completed all the requested changes. Please let me know if I missed something. Just updated the branch with main and fixed the bug I introduced. |
# Conflicts: # pyproject.toml
…/pandas into stype_enable_ruff_plw2901 # Conflicts: # pyproject.toml
@MarcoGorelli Sorry I have been away in the last few days. I just pushed the last merge with the main branch. Ideally there should be no more errors. If that is the case do you need any further update of the branch? |
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.
Looks good to me, hopefully this rule will help save some future bugs
Merging then (apologies for the delay, was away last week)
position = None | ||
continue | ||
item = line.strip() | ||
item = line_stripped.strip() |
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.
lol, the improved name you've chosen actually makes it clear that this line is probably unnecessary 😄 if you wanted to clean this up in a follow-up, that'd be welcome
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.
Will defo follow up this topic. From this Sunday I will have time to dedicate to it :)