-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: remove unused from MultiIndex #32030
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
Conversation
looks like mypy is against you here. not sure why. out of curiosity, why do need to use __new__ for MultiIndex? |
I think it is a combination of playing nicely with |
I think can just add a definition for sortorder at the class level to fix mypy |
can you clarify why this is acceptable and #31716 (comment) is not. in both cases making mypy aware of attributes. In the unacceptable case the attribute is added dynamically and therefore cannot be statically checked. Here, the attribute could be picked up by a static check if the initialazation was in __init__ instead of __new__ to me, it would seem that the other scenario should be more acceptable. |
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. i think @simonjayhawkins has a comment; those the construction methods we have already use __new__
, not likely to change as we have certain contruction requirements
yeah, happy with what is done here. the query was directed towards @WillAyd |
Yea as you mention the other one is factory generated and picks an arbitrary subset of methods to apply, so would either keep copying all attributes or stick with a weird in between. The inheritance here is much simpler and self-contained |
Thanks @jbrockmendel |
No description provided.