Skip to content

CLN/TYP: remove unused arguments in merge #40513

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

Merged
merged 3 commits into from
Mar 21, 2021

Conversation

mzeitlin11
Copy link
Member

No description provided.

Copy link
Member

@simonjayhawkins simonjayhawkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mzeitlin11 for the PR.

how: str = "left",
):
) -> np.ndarray:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring for Index.take says that a np.ndarray is returned, but it appears that is not the case.

>>> idx
RangeIndex(start=0, stop=3, step=1)
>>> 
>>> idx.take([1])
Int64Index([1], dtype='int64')
>>> 

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for noticing this, opened #40521 to address

join_index: MultiIndex,
lindexer: np.ndarray,
rindexer: np.ndarray,
) -> Tuple[List[Index], np.ndarray, List[str]]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the docstring to match for the return type of 'names of combined multiindexes'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated docstring. Plan to take a much deeper dive into this code in followups, will try to clean up more inconsistencies once I have a better handle on what's going on here.

@@ -1583,7 +1578,6 @@ def __init__(
right_index: bool = False,
axis: int = 1,
suffixes: Suffixes = ("_x", "_y"),
copy: bool = True,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be retained since in the base class _MergeOperation.__init__.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted these changes

@simonjayhawkins simonjayhawkins added Clean Typing type annotations, mypy/pyright type checking labels Mar 19, 2021
@simonjayhawkins simonjayhawkins added this to the 1.3 milestone Mar 19, 2021
@jreback jreback merged commit 74eedbc into pandas-dev:master Mar 21, 2021
@jreback
Copy link
Contributor

jreback commented Mar 21, 2021

thanks @mzeitlin11

@mzeitlin11 mzeitlin11 deleted the cln/merge branch March 21, 2021 21:48
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants