Skip to content

Commit 09e60f3

Browse files
committed
fixed linting
1 parent 60c156e commit 09e60f3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pandas/core/indexing.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,8 @@ def _handle_lowerdim_multi_index_axis0(self, tup):
947947
except KeyError as ek:
948948
# raise KeyError if number of indexers match
949949
# else IndexingError will be raised
950-
if len(tup) == len(self.obj.index._levels) and len(tup) > self.obj.ndim:
950+
if (len(tup) == len(self.obj.index._levels)
951+
and len(tup) > self.obj.ndim):
951952
raise ek
952953
except Exception as e1:
953954
if isinstance(tup[0], (slice, Index)):

pandas/tests/indexing/multiindex/test_loc.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ def test_loc_multiindex(self):
131131
with pytest.raises(KeyError, match=r"^2L?$"):
132132
mi_int.ix[2]
133133

134-
s = Series(range(8), index=MultiIndex.from_product([['a', 'b'], ['c', 'd'], ['e', 'f']]))
134+
s = Series(range(8), index=MultiIndex.from_product(
135+
[['a', 'b'], ['c', 'd'], ['e', 'f']]))
135136

136137
with pytest.raises(KeyError, match=r"^\('a', 'd', 'g'\)$"):
137138
s.loc['a', 'd', 'g']

0 commit comments

Comments
 (0)