Skip to content

Commit bc88240

Browse files
committed
CLN: some lint issues
1 parent 1719437 commit bc88240

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pandas/core/groupby.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -3599,9 +3599,9 @@ def _cython_agg_blocks(self, how, alt=None, numeric_only=True):
35993599

36003600
offset = 0
36013601
for b in new_blocks:
3602-
l = len(b.mgr_locs)
3603-
b.mgr_locs = indexer[offset:(offset + l)]
3604-
offset += l
3602+
loc = len(b.mgr_locs)
3603+
b.mgr_locs = indexer[offset:(offset + loc)]
3604+
offset += loc
36053605

36063606
return new_items, new_blocks
36073607

@@ -3640,7 +3640,7 @@ def aggregate(self, arg, *args, **kwargs):
36403640
result.columns = Index(
36413641
result.columns.levels[0],
36423642
name=self._selected_obj.columns.name)
3643-
except:
3643+
except Exception:
36443644
result = self._aggregate_generic(arg, *args, **kwargs)
36453645

36463646
if not self.as_index:
@@ -4029,7 +4029,7 @@ def _choose_path(self, fast_path, slow_path, group):
40294029
if (res_r[mask] == res_fast_r[mask]).all():
40304030
path = fast_path
40314031

4032-
except:
4032+
except Exception:
40334033
pass
40344034
return path, res
40354035

@@ -4603,7 +4603,7 @@ def fast_apply(self, f, names):
46034603
# must return keys::list, values::list, mutated::bool
46044604
try:
46054605
starts, ends = lib.generate_slices(self.slabels, self.ngroups)
4606-
except:
4606+
except Exception:
46074607
# fails when all -1
46084608
return [], True
46094609

0 commit comments

Comments
 (0)