Skip to content

Commit 5b5cdd8

Browse files
committed
Update comments and parenthesis for if condition
1 parent 10976fd commit 5b5cdd8

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

pandas/core/indexing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2734,8 +2734,8 @@ def _non_reducing_slice(slice_):
27342734
def pred(part):
27352735
# true when slice does *not* reduce, False when part is a tuple,
27362736
# i.e. MultiIndex slice
2737-
return (isinstance(part, slice) or is_list_like(part))\
2738-
and not isinstance(part, tuple)
2737+
return ((isinstance(part, slice) or is_list_like(part))
2738+
and not isinstance(part, tuple))
27392739

27402740
if not is_list_like(slice_):
27412741
if not isinstance(slice_, slice):

pandas/tests/indexing/test_indexing.py

+1
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,7 @@ def test_non_reducing_slice(self):
813813
assert isinstance(df.loc[tslice_], DataFrame)
814814

815815
def test_non_reducing_slice_on_multiindex(self):
816+
# GH 19861
816817
dic = {
817818
('a', 'd'): [1, 4],
818819
('a', 'c'): [2, 3],

pandas/tests/io/formats/test_style.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ def f(x):
275275
assert result == expected
276276

277277
def test_applymap_subset_multiindex(self):
278-
# https://github.com/pandas-dev/pandas/issues/19861
278+
# GH 19861
279+
# Smoke test for applymap
279280
def color_negative_red(val):
280281
"""
281282
Takes a scalar and returns a string with

0 commit comments

Comments
 (0)