-
-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -309,7 +309,6 @@ def _aggregate(self, arg, *args, **kwargs): | |
None if not required | ||
""" | ||
is_aggregator = lambda x: isinstance(x, (list, tuple, dict)) | ||
is_nested_renamer = False | ||
|
||
_axis = kwargs.pop("_axis", None) | ||
if _axis is None: | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. hmm i guess this was previously used, ok. |
||
if is_nested_renamer: | ||
result = list(_agg(arg, _agg_1dim).values()) | ||
|
||
if all(isinstance(r, dict) for r in result): | ||
|
||
result, results = OrderedDict(), result | ||
for r in results: | ||
result.update(r) | ||
keys = list(result.keys()) | ||
|
||
else: | ||
|
||
if self._selection is not None: | ||
keys = None | ||
|
||
# some selection on the object | ||
elif self._selection is not None: | ||
if self._selection is not None: | ||
|
||
sl = set(self._selection_list) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. this is definitiely wrong as is, but is it currently parsed as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can't seem to find a bug here. This code must work!
|
||
elif op is rfloordiv: | ||
# Note: no need to do this for rtruediv; in py3 numpy behaves the way | ||
# we want. | ||
result = mask_zero_div_zero(right, left, result) | ||
|
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