-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TYP: annotate _data #29580
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
TYP: annotate _data #29580
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
|
||
from pandas.core import algorithms, ops | ||
from pandas.core.accessor import PandasDelegate | ||
from pandas.core.arrays import ExtensionOpsMixin | ||
from pandas.core.arrays import ExtensionArray, ExtensionOpsMixin | ||
from pandas.core.arrays.datetimelike import ( | ||
DatetimeLikeArrayMixin, | ||
_ensure_datetimelike_to_i8, | ||
|
@@ -78,7 +78,7 @@ class DatetimeIndexOpsMixin(ExtensionOpsMixin): | |
common ops mixin to support a unified interface datetimelike Index | ||
""" | ||
|
||
_data = None | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Were these solely set to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these were here pre-annotations, so I think it was so that the attribute always exists |
||
_data: ExtensionArray | ||
|
||
# DatetimeLikeArrayMixin assumes subclasses are mutable, so these are | ||
# properties there. They can be made into cache_readonly for Index | ||
|
@@ -836,7 +836,7 @@ class DatetimelikeDelegateMixin(PandasDelegate): | |
# raw_properties : dispatch properties that shouldn't be boxed in an Index | ||
_raw_properties = set() # type: Set[str] | ||
name = None | ||
_data = None | ||
_data: ExtensionArray | ||
|
||
@property | ||
def _delegate_class(self): | ||
|
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.
you can now remove the assert and comment added in #29475 on L657?
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.
yes, updated
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.
updated+green