Skip to content

Commit dd8315c

Browse files
committed
Typos, flake8 fixes, rearrange comments
1 parent 014fae0 commit dd8315c

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

pandas/core/indexes/category.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ class CategoricalIndex(Index, accessors.PandasDelegate):
7272
_attributes = ['name']
7373

7474
def __init__(self, *args, **kwargs):
75-
# Override to prevent accessors.PandasDelegate.__init__ from executing
76-
# This is a kludge.
75+
# Override to prevent accessors.PandasDelegate.__init__ from
76+
# executing
7777
pass
7878

7979
def __new__(cls, data=None, categories=None, ordered=None, dtype=None,

pandas/core/series.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def wrapper(self):
113113
# Series class
114114

115115

116-
class Series(base.IndexOpsMixin, generic.NDFrame,):
116+
class Series(base.IndexOpsMixin, generic.NDFrame):
117117
"""
118118
One-dimensional ndarray with axis labels (including time series).
119119

pandas/core/strings.py

+6-10
Original file line numberDiff line numberDiff line change
@@ -1912,16 +1912,6 @@ def rindex(self, sub, start=0, end=None):
19121912
docstring=_shared_docs['ismethods'] %
19131913
_shared_docs['isdecimal'])
19141914

1915-
# TODO: Should we explicitly subclass PandasDelegate to clarify its role,
1916-
# even though it isn't actually needed?
1917-
# TODO: Use this instead of wrapping all of these methods individually?
1918-
def _delegate_method(self, name, *args, **kwargs):
1919-
# TODO: It would be really nice to keep the signatures
1920-
method = getattr(self.values, name)
1921-
res = method(*args, **kwargs)
1922-
# TODO: Should this get wrapped in an index?
1923-
return res
1924-
19251915
@classmethod
19261916
def _make_accessor(cls, data):
19271917
from pandas.core.index import Index
@@ -1954,6 +1944,12 @@ def _make_accessor(cls, data):
19541944
raise AttributeError(message)
19551945
return StringAccessor(data)
19561946

1947+
# TODO: Should we explicitly subclass PandasDelegate to clarify its
1948+
# role, even though it isn't actually needed?
1949+
# _delegate_method is really simple in this case:
1950+
# getattr(self.values, name)(*args, **kwargs)
1951+
# possibly wrapped in an Index.
1952+
19571953

19581954
StringAccessor = StringMethods # Alias to mirror CategoricalAccessor
19591955

0 commit comments

Comments
 (0)