-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
CLN: Break up wrap applied output #36536
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
CLN: Break up wrap applied output #36536
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.
+1
For me this makes _wrap_applied_output
easier to follow
can you merge master and ill take a look |
…eakup_wrap_applied_output
@jbrockmendel Merged and passing thus far. Much of the diff is due to indentation being one level less, easier to view if you ignore whitespace. |
keys, | ||
values: List[Series], | ||
not_indexed_same: bool, | ||
first_not_none, |
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.
ideally if you can type the args (certainly can be a followon)
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 was thinking this too, but wasn't certain of types. We can't rely on mypy to catch improper typing here because this is being called from untyped code. I can guess at types and run tests with assert isinstance(var, guess)
to confirm the guess, and rely on good test coverage. Is that an appropriate way to approach here?
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.
sure u can try that
ultimately we want to type all the way up and have mypy validate - but of course takes time and effort to get there
keys, values, not_indexed_same=not_indexed_same | ||
) | ||
# values are Series | ||
return self._wrap_applied_output_series( |
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.
isn't L1198 and L1207 also a series?
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.
L1198 values
is a list of either ndarrays or Index; L1207 values
is a list of scalars.
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.
ok i c, can you make these clear in comments (followon ok).
Splitting off the Series case seemed to be a natural way to break up this method. Always open to other thoughts.