Skip to content

Commit 00706fe

Browse files
SebStrugproost
authored andcommitted
Fixed more SS03 errors (pandas-dev#29540)
1 parent 3068f53 commit 00706fe

File tree

5 files changed

+20
-16
lines changed

5 files changed

+20
-16
lines changed

pandas/core/indexes/interval.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def _get_interval_closed_bounds(interval):
121121
def _new_IntervalIndex(cls, d):
122122
"""
123123
This is called upon unpickling, rather than the default which doesn't have
124-
arguments and breaks __new__
124+
arguments and breaks __new__.
125125
"""
126126
return cls.from_arrays(**d)
127127

@@ -392,23 +392,23 @@ def _multiindex(self):
392392
def left(self):
393393
"""
394394
Return the left endpoints of each Interval in the IntervalIndex as
395-
an Index
395+
an Index.
396396
"""
397397
return self._data._left
398398

399399
@property
400400
def right(self):
401401
"""
402402
Return the right endpoints of each Interval in the IntervalIndex as
403-
an Index
403+
an Index.
404404
"""
405405
return self._data._right
406406

407407
@property
408408
def closed(self):
409409
"""
410410
Whether the intervals are closed on the left-side, right-side, both or
411-
neither
411+
neither.
412412
"""
413413
return self._data._closed
414414

@@ -446,7 +446,7 @@ def set_closed(self, closed):
446446
def length(self):
447447
"""
448448
Return an Index with entries denoting the length of each Interval in
449-
the IntervalIndex
449+
the IntervalIndex.
450450
"""
451451
return self._data.length
452452

@@ -537,7 +537,7 @@ def memory_usage(self, deep=False):
537537
@cache_readonly
538538
def mid(self):
539539
"""
540-
Return the midpoint of each Interval in the IntervalIndex as an Index
540+
Return the midpoint of each Interval in the IntervalIndex as an Index.
541541
"""
542542
return self._data.mid
543543

pandas/core/indexes/numeric.py

+10-7
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@
3636

3737
class NumericIndex(Index):
3838
"""
39-
Provide numeric type operations
40-
41-
This is an abstract class
39+
Provide numeric type operations.
4240
41+
This is an abstract class.
4342
"""
4443

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

8988
def _convert_for_op(self, value):
90-
""" Convert value to be insertable to ndarray """
89+
"""
90+
Convert value to be insertable to ndarray.
91+
"""
9192

9293
if is_bool(value) or is_bool_dtype(value):
9394
# force conversion to object
@@ -135,7 +136,7 @@ def _concat_same_dtype(self, indexes, name):
135136
@property
136137
def is_all_dates(self):
137138
"""
138-
Checks that all the labels are datetime objects
139+
Checks that all the labels are datetime objects.
139140
"""
140141
return False
141142

@@ -169,7 +170,7 @@ def _union(self, other, sort):
169170
] = """
170171
Immutable ndarray implementing an ordered, sliceable set. The basic object
171172
storing axis labels for all pandas objects. %(klass)s is a special case
172-
of `Index` with purely %(ltype)s labels. %(extra)s
173+
of `Index` with purely %(ltype)s labels. %(extra)s.
173174
174175
Parameters
175176
----------
@@ -412,7 +413,9 @@ def _format_native_types(
412413
return formatter.get_result_as_array()
413414

414415
def get_value(self, series, key):
415-
""" we always want to get an index value, never a value """
416+
"""
417+
We always want to get an index value, never a value.
418+
"""
416419
if not is_scalar(key):
417420
raise InvalidIndexError
418421

pandas/io/stata.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
)
140140

141141
_data_method_doc = """
142-
Read observations from Stata file, converting them into a dataframe
142+
Read observations from Stata file, converting them into a dataframe.
143143
144144
.. deprecated::
145145
This is a legacy method. Use `read` in new code.

pandas/plotting/_misc.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,10 @@ def tsplot(series, plotf, ax=None, **kwargs):
456456
class _Options(dict):
457457
"""
458458
Stores pandas plotting options.
459+
459460
Allows for parameter aliasing so you can just use parameter names that are
460461
the same as the plot function parameters, but is stored in a canonical
461-
format that makes it easy to breakdown into groups later
462+
format that makes it easy to breakdown into groups later.
462463
"""
463464

464465
# alias so the names are same as plotting method parameter names

pandas/tseries/frequencies.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def get_period_alias(offset_str):
7171
def to_offset(freq):
7272
"""
7373
Return DateOffset object from string or tuple representation
74-
or datetime.timedelta object
74+
or datetime.timedelta object.
7575
7676
Parameters
7777
----------

0 commit comments

Comments
 (0)