Skip to content

CLN: Move _convert_to_list_like to common #34127

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 9 commits into from
May 13, 2020
Merged

CLN: Move _convert_to_list_like to common #34127

merged 9 commits into from
May 13, 2020

Conversation

dsaxton
Copy link
Member

@dsaxton dsaxton commented May 12, 2020

No description provided.



def convert_to_list_like(values):
if hasattr(values, "dtype"):
Copy link
Contributor

Choose a reason for hiding this comment

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

can u type and add a doc string
make these elif

see where else we can u this

@jreback jreback added the Clean label May 12, 2020

def convert_to_list_like(
values: Union[Scalar, Iterable, AnyArrayLike]
) -> Union[List, AnyArrayLike]:
Copy link
Member Author

Choose a reason for hiding this comment

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

Had to rewrite this a bit to get it to type check

Copy link
Member

Choose a reason for hiding this comment

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

@dsaxton i noticed you used ABCIndex instead of ABCIndexClass, was that intentional?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so, definitely change if you feel it's not correct

@@ -4,17 +4,16 @@
Note: pandas.core.common is *not* part of the public API.
"""

import collections
from collections import abc
from collections import abc, defaultdict
Copy link
Member Author

Choose a reason for hiding this comment

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

Slightly unrelated, but this seems better than mixing the two import styles

Copy link
Member

Choose a reason for hiding this comment

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

agreed

@jreback jreback added this to the 1.1 milestone May 13, 2020
@jreback
Copy link
Contributor

jreback commented May 13, 2020

hmm azure doesnt' seem to be running. can you merge master and ping on green.

@jreback jreback merged commit dfaa507 into pandas-dev:master May 13, 2020
@jreback
Copy link
Contributor

jreback commented May 13, 2020

thanks

@dsaxton dsaxton deleted the move-function branch May 13, 2020 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants