-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
CLN: more lgtm.com cleanups #30259
Conversation
@@ -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 |
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 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: |
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.
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
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.
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
>>>
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.
lgtm
@@ -398,24 +397,7 @@ def _agg(arg, func): | |||
keys = list(arg.keys()) | |||
result = OrderedDict() | |||
|
|||
# nested renamer |
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.
hmm i guess this was previously used, ok.
thanks @simonjayhawkins |
No description provided.