Skip to content

Commit 4b7334c

Browse files
committed
Fixed find-replace fail
1 parent ad871ce commit 4b7334c

File tree

11 files changed

+18
-18
lines changed

11 files changed

+18
-18
lines changed

pandas/core/generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4375,7 +4375,7 @@ def __getattr__(self, name):
43754375
name in self._accessors):
43764376
return object.__getattribute__(self, name)
43774377
else:
4378-
if (self._info_axis.__can_hold_identifiers and
4378+
if (self._info_axis._can_hold_identifiers and
43794379
name in self._info_axis):
43804380
return self[name]
43814381
return object.__getattribute__(self, name)

pandas/core/indexes/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,10 @@ class Index(IndexOpsMixin, PandasObject):
246246
_accessors = set(['str'])
247247
# Whether items can be selected from NDFrame.<item>
248248
# Some indexes (DatetimeIndex, Int64Index) cannot contain
249-
# valid Python identifiers. Setting __can_hold_identifiers = False is an
249+
# valid Python identifiers. Setting _can_hold_identifiers = False is an
250250
# optimization.
251251
# https://github.com/pandas-dev/pandas/issues/19764
252-
__can_hold_identifiers = True
252+
_can_hold_identifiers = True
253253

254254
str = CachedAccessor("str", StringMethods)
255255

pandas/core/indexes/interval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class IntervalIndex(IntervalMixin, Index):
207207
_typ = 'intervalindex'
208208
_comparables = ['name']
209209
_attributes = ['name', 'closed']
210-
__can_hold_identifiers = False # can't contain Python identifiers
210+
_can_hold_identifiers = False # can't contain Python identifiers
211211

212212
# we would like our indexing holder to defer to us
213213
_defer_to_indexing = True

pandas/core/indexes/numeric.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class NumericIndex(Index):
3131
3232
"""
3333
_is_numeric_dtype = True
34-
__can_hold_identifiers = False # Can't contain Python identifiers
34+
_can_hold_identifiers = False # Can't contain Python identifiers
3535

3636
def __new__(cls, data=None, dtype=None, copy=False, name=None,
3737
fastpath=False):

pandas/core/indexes/period.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class PeriodIndex(DatelikeOps, DatetimeIndexOpsMixin, Int64Index):
204204
"""
205205
_typ = 'periodindex'
206206
_attributes = ['name', 'freq']
207-
__can_hold_identifiers = False # Can't contain Python identifiers
207+
_can_hold_identifiers = False # Can't contain Python identifiers
208208

209209
# define my properties & methods for delegation
210210
_other_ops = []

pandas/tests/indexes/datetimelike.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
class DatetimeLike(Base):
1010

11-
def test__can_hold_identifiers(self):
11+
def test_can_hold_identifiers(self):
1212
idx = self.create_index()
13-
assert idx.__can_hold_identifiers is False
13+
assert idx._can_hold_identifiers is False
1414

1515
def test_shift_identity(self):
1616

pandas/tests/indexes/test_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ def generate_index_types(self, skip_index_keys=[]):
6666
if key not in skip_index_keys:
6767
yield key, idx
6868

69-
def test__can_hold_identifiers(self):
69+
def test_can_hold_identifiers(self):
7070
idx = self.create_index()
71-
assert idx.__can_hold_identifiers is True
71+
assert idx._can_hold_identifiers is True
7272

7373
def test_new_axis(self):
7474
new_index = self.dateIndex[None, :]

pandas/tests/indexes/test_category.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ def create_index(self, categories=None, ordered=False):
3333
return CategoricalIndex(
3434
list('aabbca'), categories=categories, ordered=ordered)
3535

36-
def test__can_hold_identifiers(self):
36+
def test_can_hold_identifiers(self):
3737
ci = self.create_index(categories=list('abcd'))
38-
assert ci.__can_hold_identifiers is True
38+
assert ci._can_hold_identifiers is True
3939

4040
def test_construction(self):
4141

pandas/tests/indexes/test_multi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ def setup_method(self, method):
4848
def create_index(self):
4949
return self.index
5050

51-
def test__can_hold_identifiers(self):
51+
def test_can_hold_identifiers(self):
5252
idx = self.create_index()
53-
assert idx.__can_hold_identifiers is True
53+
assert idx._can_hold_identifiers is True
5454

5555
def test_boolean_context_compat2(self):
5656

pandas/tests/indexes/test_numeric.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ def test_index_rdiv_timedelta(self, scalar_td, index):
6464

6565
class Numeric(Base):
6666

67-
def test__can_hold_identifiers(self):
67+
def test_can_hold_identifiers(self):
6868
idx = self.create_index()
69-
assert idx.__can_hold_identifiers is False
69+
assert idx._can_hold_identifiers is False
7070

7171
def test_numeric_compat(self):
7272
pass # override Base method

pandas/tests/indexes/test_range.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ def check_binop(self, ops, scalars, idxs):
4444
expected = op(Int64Index(idx), scalar)
4545
tm.assert_index_equal(result, expected)
4646

47-
def test__can_hold_identifiers(self):
47+
def test_can_hold_identifiers(self):
4848
idx = self.create_index()
49-
assert idx.__can_hold_identifiers is False
49+
assert idx._can_hold_identifiers is False
5050

5151
def test_binops(self):
5252
ops = [operator.add, operator.sub, operator.mul, operator.floordiv,

0 commit comments

Comments
 (0)