-
Notifications
You must be signed in to change notification settings - Fork 915
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
Update pre-commit to run black 22.3.0 #10523
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.
I am seeing CI failures. This should fix the problem until we can identify a longer-term fix (which may require upgrading black).
Codecov Report
@@ Coverage Diff @@
## branch-22.06 #10523 +/- ##
===============================================
Coverage ? 86.33%
===============================================
Files ? 140
Lines ? 22294
Branches ? 0
===============================================
Hits ? 19248
Misses ? 3046
Partials ? 0 Continue to review full report at Codecov.
|
This reverts commit bd6857b.
Just FYI I'm following up on what to do regarding the outstanding copyright changes here, |
def from_scalar( | ||
val: ScalarLike, | ||
size: int | ||
) -> ColumnBase: # TODO: This should be Scalar, not ScalarLike |
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.
@vyasr FYI this reformat drops comments in .pyi
files. I noticed this in a previous attempt to update black
but I wasn't sure how to address it.
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 the note. I'll see what we can do about that.
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.
It looks like the issue is specifically the inline comments on lines that get compressed. I guess we'll just have to remember to put comments on separate lines from now on in pyi files.
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.
With TODO
s, wonder if we should just file these as issues. That would make them easier to track, cross-reference, triage, resolve, etc.
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.
That's a fair question. I try to use my best judgment. TODOs have a lower energy barrier and issues feel excessive to track one-line changes, but there's definitely a visibility cost. Especially given the current state of cudf internals (heavily in flux) I'm inclined to be a bit lax about this for now. Maybe we get stricter in the future once we have a clearer design and code isn't constantly being deleted and rewritten, but at the moment it's not uncommon for TODOs like this to become moot when the relevant code paths are removed wholesale.
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.
...at the moment it's not uncommon for TODOs like this to become moot when the relevant code paths are removed wholesale
Honestly this is my biggest worry with TODO
s and have seen this happen to other code bases. Comments left that no longer pertain to the code they are near with no one that has a clue what they mean. It is clearer to see what issues intended and when they are resolved.
Adds back a comment that was accidentally removed in #10523. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar) URL: #10526
This is a follow-up to #10523 that updates the conda environment now that the [conda-forge package should be available](conda-forge/black-feedstock#42). Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar) - https://github.com/jakirkham - AJ Schmidt (https://github.com/ajschmidt8) URL: #10525
This PR pins Click to a version supported by the version of black that we use. #10523 is too disruptive to backport to 22.04 in the middle of a release, so this is a minimum change to unblock linter runs. Authors: - Vyas Ramasubramani (https://github.com/vyasr) - GALI PREM SAGAR (https://github.com/galipremsagar) Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar)
…0541) This PR undoes #10535 (which was just a patch for cudf 22.04) on cudf 22.06 since we have implemented the longer term solution in #10523. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - Ashwin Srinath (https://github.com/shwina) URL: #10541
This PR updates us to use black 22.3.0, which is now necessary because older versions of black are not compatible with current versions of Click (see psf/black#2964 is resolved).
I've opened this for 22.06 since I don't see any open PRs attempting to merge into 22.04 anymore, but this issue will block CI (which runs style checks using pre-commit) so if necessary I can backport.