Skip to content

Fixed more SS03 errors #29540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pandas/core/indexes/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def _get_interval_closed_bounds(interval):
def _new_IntervalIndex(cls, d):
"""
This is called upon unpickling, rather than the default which doesn't have
arguments and breaks __new__
arguments and breaks __new__.
"""
return cls.from_arrays(**d)

Expand Down Expand Up @@ -392,23 +392,23 @@ def _multiindex(self):
def left(self):
"""
Return the left endpoints of each Interval in the IntervalIndex as
an Index
an Index.
"""
return self._data._left

@property
def right(self):
"""
Return the right endpoints of each Interval in the IntervalIndex as
an Index
an Index.
"""
return self._data._right

@property
def closed(self):
"""
Whether the intervals are closed on the left-side, right-side, both or
neither
neither.
"""
return self._data._closed

Expand Down Expand Up @@ -446,7 +446,7 @@ def set_closed(self, closed):
def length(self):
"""
Return an Index with entries denoting the length of each Interval in
the IntervalIndex
the IntervalIndex.
"""
return self._data.length

Expand Down Expand Up @@ -537,7 +537,7 @@ def memory_usage(self, deep=False):
@cache_readonly
def mid(self):
"""
Return the midpoint of each Interval in the IntervalIndex as an Index
Return the midpoint of each Interval in the IntervalIndex as an Index.
"""
return self._data.mid

Expand Down
17 changes: 10 additions & 7 deletions pandas/core/indexes/numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@

class NumericIndex(Index):
"""
Provide numeric type operations

This is an abstract class
Provide numeric type operations.

This is an abstract class.
"""

_is_numeric_dtype = True
Expand Down Expand Up @@ -87,7 +86,9 @@ def _shallow_copy(self, values=None, **kwargs):
return super()._shallow_copy(values=values, **kwargs)

def _convert_for_op(self, value):
""" Convert value to be insertable to ndarray """
"""
Convert value to be insertable to ndarray.
"""

if is_bool(value) or is_bool_dtype(value):
# force conversion to object
Expand Down Expand Up @@ -135,7 +136,7 @@ def _concat_same_dtype(self, indexes, name):
@property
def is_all_dates(self):
"""
Checks that all the labels are datetime objects
Checks that all the labels are datetime objects.
"""
return False

Expand Down Expand Up @@ -169,7 +170,7 @@ def _union(self, other, sort):
] = """
Immutable ndarray implementing an ordered, sliceable set. The basic object
storing axis labels for all pandas objects. %(klass)s is a special case
of `Index` with purely %(ltype)s labels. %(extra)s
of `Index` with purely %(ltype)s labels. %(extra)s.

Parameters
----------
Expand Down Expand Up @@ -412,7 +413,9 @@ def _format_native_types(
return formatter.get_result_as_array()

def get_value(self, series, key):
""" we always want to get an index value, never a value """
"""
We always want to get an index value, never a value.
"""
if not is_scalar(key):
raise InvalidIndexError

Expand Down
2 changes: 1 addition & 1 deletion pandas/io/stata.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
)

_data_method_doc = """
Read observations from Stata file, converting them into a dataframe
Read observations from Stata file, converting them into a dataframe.

.. deprecated::
This is a legacy method. Use `read` in new code.
Expand Down
3 changes: 2 additions & 1 deletion pandas/plotting/_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,10 @@ def tsplot(series, plotf, ax=None, **kwargs):
class _Options(dict):
"""
Stores pandas plotting options.

Allows for parameter aliasing so you can just use parameter names that are
the same as the plot function parameters, but is stored in a canonical
format that makes it easy to breakdown into groups later
format that makes it easy to breakdown into groups later.
"""

# alias so the names are same as plotting method parameter names
Expand Down
2 changes: 1 addition & 1 deletion pandas/tseries/frequencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def get_period_alias(offset_str):
def to_offset(freq):
"""
Return DateOffset object from string or tuple representation
or datetime.timedelta object
or datetime.timedelta object.

Parameters
----------
Expand Down