Skip to content

CLN: avoid getattr(obj, "values", obj) #33776

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 26 commits into from
Apr 25, 2020

Conversation

jbrockmendel
Copy link
Member

xref #27167

@mroeschke can you pls double-check me on the change in window.rolling

@jreback jreback added the Clean label Apr 24, 2020
@jreback jreback added this to the 1.1 milestone Apr 24, 2020
@mroeschke
Copy link
Member

LGTM as well. Clearer call IMO

@@ -648,7 +648,7 @@ def fillna(self, value=None, method=None, limit=None):
)
raise TypeError(msg)

value = getattr(value, "_values", value)
value = extract_array(value, extract_numpy=True)
Copy link
Member

Choose a reason for hiding this comment

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

There is a if not isinstance(value, Interval) just above, meaning that value should be an Interval, and this line can just be removed altogether?

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch, will update

@jreback jreback merged commit 0163b79 into pandas-dev:master Apr 25, 2020
@jbrockmendel jbrockmendel deleted the no-getattr-values branch April 25, 2020 21:03
rhshadrach pushed a commit to rhshadrach/pandas that referenced this pull request May 10, 2020
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.

4 participants