Skip to content

Commit 4a4c076

Browse files
DOC: Enforce Numpy Docstring Validation for pandas.Interval.right pandas.Interval.left pandas.Interval.closed (#58571)
* DOC: add SA01 for pandas.Interval.closed * DOC: remove SA01 for pandas.Interval.closed * DOC: add SA01 for pandas.Interval.closed * DOC: add SA01 for pandas.Interval.left * DOC: remove SA01 for pandas.Interval.left * DOC: add SA01 for pandas.Interval.right * DOC: remove SA01 for pandas.Interval.right
1 parent eadc129 commit 4a4c076

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

ci/code_checks.sh

-3
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8787
-i "pandas.Index.ravel PR01,RT03" \
8888
-i "pandas.Index.str PR01,SA01" \
8989
-i "pandas.Interval PR02" \
90-
-i "pandas.Interval.closed SA01" \
91-
-i "pandas.Interval.left SA01" \
92-
-i "pandas.Interval.right SA01" \
9390
-i "pandas.IntervalIndex.closed SA01" \
9491
-i "pandas.IntervalIndex.contains RT03" \
9592
-i "pandas.IntervalIndex.get_loc PR07,RT03,SA01" \

pandas/_libs/interval.pyx

+19
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,12 @@ cdef class Interval(IntervalMixin):
383383
"""
384384
Left bound for the interval.
385385
386+
See Also
387+
--------
388+
Interval.right : Return the right bound for the interval.
389+
numpy.ndarray.left : A similar method in numpy for obtaining
390+
the left endpoint(s) of intervals.
391+
386392
Examples
387393
--------
388394
>>> interval = pd.Interval(left=1, right=2, closed='left')
@@ -396,6 +402,12 @@ cdef class Interval(IntervalMixin):
396402
"""
397403
Right bound for the interval.
398404
405+
See Also
406+
--------
407+
Interval.left : Return the left bound for the interval.
408+
numpy.ndarray.right : A similar method in numpy for obtaining
409+
the right endpoint(s) of intervals.
410+
399411
Examples
400412
--------
401413
>>> interval = pd.Interval(left=1, right=2, closed='left')
@@ -411,6 +423,13 @@ cdef class Interval(IntervalMixin):
411423
412424
Either ``left``, ``right``, ``both`` or ``neither``.
413425
426+
See Also
427+
--------
428+
Interval.closed_left : Check if the interval is closed on the left side.
429+
Interval.closed_right : Check if the interval is closed on the right side.
430+
Interval.open_left : Check if the interval is open on the left side.
431+
Interval.open_right : Check if the interval is open on the right side.
432+
414433
Examples
415434
--------
416435
>>> interval = pd.Interval(left=1, right=2, closed='left')

0 commit comments

Comments
 (0)