Skip to content

CLN: more lgtm.com cleanups #30259

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 1 commit into from
Dec 15, 2019
Merged

Conversation

simonjayhawkins
Copy link
Member

No description provided.

@@ -179,7 +179,6 @@ def _generate_range_overflow_safe_signed(
# watch out for very special case in which we just slightly
# exceed implementation bounds, but when passing the result to
# np.arange will get a result slightly within the bounds
assert endpoint >= 0
Copy link
Member

Choose a reason for hiding this comment

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

i see how this is redundant given L176 and L178, but it doesn't seem harmful

@@ -168,7 +168,7 @@ def dispatch_fill_zeros(op, left, right, result):
# Note: no need to do this for truediv; in py3 numpy behaves the way
# we want.
result = mask_zero_div_zero(left, right, result)
elif op is op is rfloordiv:
Copy link
Member

Choose a reason for hiding this comment

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

this is definitiely wrong as is, but is it currently parsed as elif op is (op is rfloordiv): in which case it would also evaluate to False? If so, there may be a bug hidden in here

Copy link
Member Author

Choose a reason for hiding this comment

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

can't seem to find a bug here. This code must work!

>>> def rfloordiv(left, right):
...     return right // left
...
>>> op = rfloordiv
>>>
>>> op is op is rfloordiv
True
>>>
>>> op is (op is rfloordiv)
False
>>>
>>> (op is op) is rfloordiv
False
>>>
>>> op is rfloordiv
True
>>>
>>> 1 is 1 is 1
True
>>>
>>> (1 is 1) is 1
False
>>>
>>> 1 is (1 is 1)
False
>>>

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm

@WillAyd WillAyd added this to the 1.0 milestone Dec 14, 2019
@@ -398,24 +397,7 @@ def _agg(arg, func):
keys = list(arg.keys())
result = OrderedDict()

# nested renamer
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm i guess this was previously used, ok.

@jreback jreback merged commit aa2c27f into pandas-dev:master Dec 15, 2019
@jreback
Copy link
Contributor

jreback commented Dec 15, 2019

thanks @simonjayhawkins

@simonjayhawkins simonjayhawkins deleted the more-lgtm branch December 16, 2019 00:34
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
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