-
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
Replace custom cached_property
implementation with functools
#10272
Replace custom cached_property
implementation with functools
#10272
Conversation
python/cudf/cudf/core/frame.py
Outdated
@@ -91,7 +91,7 @@ def _num_rows(self) -> int: | |||
|
|||
@property | |||
def _column_names(self) -> List[Any]: # TODO: List[str]? | |||
return self._data.names | |||
return list(self._data.names) |
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.
We previously returned a tuple
while hinting that we were returning a list
. Which one should we return?
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.
Copyright checks are failing. I commented on the thread about tuple/list. Pending resolution of that thread, this looks good.
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.
Codecov Report
@@ Coverage Diff @@
## branch-22.04 #10272 +/- ##
================================================
+ Coverage 10.42% 10.67% +0.25%
================================================
Files 119 122 +3
Lines 20603 20866 +263
================================================
+ Hits 2148 2228 +80
- Misses 18455 18638 +183
Continue to review full report at Codecov.
|
@gpucibot merge |
Replaces our custom
cached_property
with that provided byfunctools
since Python 3.8. This uncovered a couple of typing bugs that previously eluded us.