From 36109f5bacc607d3f03a73f45ab43e57fda7720d Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Sat, 4 May 2024 18:17:32 +0530 Subject: [PATCH 1/7] DOC: add SA01 for pandas.Interval.closed --- pandas/_libs/interval.pyx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pandas/_libs/interval.pyx b/pandas/_libs/interval.pyx index a37ab45dd57ed..f8ee34e6b9257 100644 --- a/pandas/_libs/interval.pyx +++ b/pandas/_libs/interval.pyx @@ -405,6 +405,14 @@ cdef class Interval(IntervalMixin): Either ``left``, ``right``, ``both`` or ``neither``. + See Also + -------- + Interval.open_left : Boolean inverse of closed_left. + Interval.closed_left : Check if the interval is closed on the left side. + Interval.closed_right : Check if the interval is closed on the right side. + Interval.open_left : Check if the interval is open on the left side. + Interval.open_right : Check if the interval is open on the right side. + Examples -------- >>> interval = pd.Interval(left=1, right=2, closed='left') From bacfca658c277086359cd82a29ea76f34853e22d Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Sat, 4 May 2024 18:18:18 +0530 Subject: [PATCH 2/7] DOC: remove SA01 for pandas.Interval.closed --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 936e3664cfe93..4f6d7b5c5b92c 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -87,7 +87,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Index.ravel PR01,RT03" \ -i "pandas.Index.str PR01,SA01" \ -i "pandas.Interval PR02" \ - -i "pandas.Interval.closed SA01" \ -i "pandas.Interval.left SA01" \ -i "pandas.Interval.mid SA01" \ -i "pandas.Interval.right SA01" \ From f97c177e6159ac2865f2cf5929da1ada77a6fce3 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Sat, 4 May 2024 18:19:47 +0530 Subject: [PATCH 3/7] DOC: add SA01 for pandas.Interval.closed --- pandas/_libs/interval.pyx | 1 - 1 file changed, 1 deletion(-) diff --git a/pandas/_libs/interval.pyx b/pandas/_libs/interval.pyx index f8ee34e6b9257..251cde71a920d 100644 --- a/pandas/_libs/interval.pyx +++ b/pandas/_libs/interval.pyx @@ -407,7 +407,6 @@ cdef class Interval(IntervalMixin): See Also -------- - Interval.open_left : Boolean inverse of closed_left. Interval.closed_left : Check if the interval is closed on the left side. Interval.closed_right : Check if the interval is closed on the right side. Interval.open_left : Check if the interval is open on the left side. From c514be1a3dafb8ef0a59b3606c3e36a8eab621ea Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Sat, 4 May 2024 18:30:52 +0530 Subject: [PATCH 4/7] DOC: add SA01 for pandas.Interval.left --- pandas/_libs/interval.pyx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandas/_libs/interval.pyx b/pandas/_libs/interval.pyx index a37ab45dd57ed..4b47136b779f0 100644 --- a/pandas/_libs/interval.pyx +++ b/pandas/_libs/interval.pyx @@ -377,6 +377,12 @@ cdef class Interval(IntervalMixin): """ Left bound for the interval. + See Also + -------- + Interval.right : Return the right bound for the interval. + numpy.ndarray.left : A similar method in numpy for obtaining + the left endpoint(s) of intervals. + Examples -------- >>> interval = pd.Interval(left=1, right=2, closed='left') From cec58c7cdc968ebf61098938533d3fc45cfcfc14 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Sat, 4 May 2024 18:31:08 +0530 Subject: [PATCH 5/7] DOC: remove SA01 for pandas.Interval.left --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 936e3664cfe93..bec4fe25cb937 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -88,7 +88,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Index.str PR01,SA01" \ -i "pandas.Interval PR02" \ -i "pandas.Interval.closed SA01" \ - -i "pandas.Interval.left SA01" \ -i "pandas.Interval.mid SA01" \ -i "pandas.Interval.right SA01" \ -i "pandas.IntervalIndex.closed SA01" \ From 1bdb97f14816b6918aac7d874d03e7684d967af2 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Sat, 4 May 2024 18:33:52 +0530 Subject: [PATCH 6/7] DOC: add SA01 for pandas.Interval.right --- pandas/_libs/interval.pyx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandas/_libs/interval.pyx b/pandas/_libs/interval.pyx index a37ab45dd57ed..4741b6a33839e 100644 --- a/pandas/_libs/interval.pyx +++ b/pandas/_libs/interval.pyx @@ -390,6 +390,12 @@ cdef class Interval(IntervalMixin): """ Right bound for the interval. + See Also + -------- + Interval.left : Return the left bound for the interval. + numpy.ndarray.right : A similar method in numpy for obtaining + the right endpoint(s) of intervals. + Examples -------- >>> interval = pd.Interval(left=1, right=2, closed='left') From a950a0c32acb307bd9142d5e5fc0bc814ec7bdcc Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Sat, 4 May 2024 18:34:17 +0530 Subject: [PATCH 7/7] DOC: remove SA01 for pandas.Interval.right --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 936e3664cfe93..405951ecf0791 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -90,7 +90,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Interval.closed SA01" \ -i "pandas.Interval.left SA01" \ -i "pandas.Interval.mid SA01" \ - -i "pandas.Interval.right SA01" \ -i "pandas.IntervalIndex.closed SA01" \ -i "pandas.IntervalIndex.contains RT03" \ -i "pandas.IntervalIndex.get_loc PR07,RT03,SA01" \