-
-
Notifications
You must be signed in to change notification settings - Fork 154
Type multi.pyi #1539
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
base: main
Are you sure you want to change the base?
Type multi.pyi #1539
Conversation
9fd9d1c to
5b0f165
Compare
| ) -> Self: ... | ||
| def view(self, cls=...): ... | ||
| def __contains__(self, key) -> bool: ... | ||
| def view(self, cls: Any = None) -> MultiIndex: ... # type: ignore[override] # pyrefly: ignore[bad-override] # pyright: ignore[reportIncompatibleMethodOverride] |
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.
this is an odd one, for multiindex.view, cls is ignored 🤷
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 think we may be able to refine it, docs suggest: data-type or ndarray sub-class or None
24add02 to
4f7b277
Compare
| def insert(self, loc, item): ... | ||
| def delete(self, loc): ... | ||
| ) -> MultiIndex: ... | ||
| def equal_levels(self, other: MultiIndex) -> bool: ... |
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.
Is this actually documented? I can't find it in the docs
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.
Could not find it at all, prob worth deleting unless you have seen use cases in production.
loicdiridollou
left a comment
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.
One minor question but otherwise looking good!
loicdiridollou
left a comment
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.
One minor question but otherwise looking good!
| ) -> Self: ... | ||
| def view(self, cls=...): ... | ||
| def __contains__(self, key) -> bool: ... | ||
| def view(self, cls: Any = None) -> MultiIndex: ... # type: ignore[override] # pyrefly: ignore[bad-override] # pyright: ignore[reportIncompatibleMethodOverride] |
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 think we may be able to refine it, docs suggest: data-type or ndarray sub-class or None
| def insert(self, loc, item): ... | ||
| def delete(self, loc): ... | ||
| ) -> MultiIndex: ... | ||
| def equal_levels(self, other: MultiIndex) -> bool: ... |
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.
Could not find it at all, prob worth deleting unless you have seen use cases in production.
the following just get inherited from Index:
__contains__the following are undocumented:
__reduce__the rest i've typed