From 76fcbb043582f038b850a79e6f4d8b1362b5ba25 Mon Sep 17 00:00:00 2001 From: Rob <124158982+rob-sil@users.noreply.github.com> Date: Sat, 10 Aug 2024 07:15:05 -0700 Subject: [PATCH 1/3] Add missing single quote to docstring --- pandas/_libs/tslibs/timestamps.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index 369184d9df40c..ea22429c56e6a 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -2443,7 +2443,7 @@ timedelta}, default 'raise' * 'NaT' will return NaT for an ambiguous time. * 'raise' will raise an AmbiguousTimeError for an ambiguous time. - nonexistent : 'shift_forward', 'shift_backward, 'NaT', timedelta, \ + nonexistent : 'shift_forward', 'shift_backward', 'NaT', timedelta, \ default 'raise' A nonexistent time does not exist in a particular timezone where clocks moved forward due to DST. From 01340549363cd29c2d8ae71afbb83ea852a1571a Mon Sep 17 00:00:00 2001 From: Rob <124158982+rob-sil@users.noreply.github.com> Date: Sat, 10 Aug 2024 16:19:35 -0700 Subject: [PATCH 2/3] More missing single quotes --- pandas/_libs/tslibs/nattype.pyx | 8 ++++---- pandas/_libs/tslibs/timestamps.pyx | 6 +++--- pandas/tests/scalar/test_nat.py | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pandas/_libs/tslibs/nattype.pyx b/pandas/_libs/tslibs/nattype.pyx index 130e41e5104a2..81b59578fe8c4 100644 --- a/pandas/_libs/tslibs/nattype.pyx +++ b/pandas/_libs/tslibs/nattype.pyx @@ -1047,7 +1047,7 @@ class NaTType(_NaT): * 'NaT' will return NaT for an ambiguous time. * 'raise' will raise an AmbiguousTimeError for an ambiguous time. - nonexistent : {'raise', 'shift_forward', 'shift_backward, 'NaT', \ + nonexistent : {'raise', 'shift_forward', 'shift_backward', 'NaT', \ timedelta}, default 'raise' A nonexistent time does not exist in a particular timezone where clocks moved forward due to DST. @@ -1148,7 +1148,7 @@ timedelta}, default 'raise' * 'NaT' will return NaT for an ambiguous time. * 'raise' will raise an AmbiguousTimeError for an ambiguous time. - nonexistent : {'raise', 'shift_forward', 'shift_backward, 'NaT', \ + nonexistent : {'raise', 'shift_forward', 'shift_backward', 'NaT', \ timedelta}, default 'raise' A nonexistent time does not exist in a particular timezone where clocks moved forward due to DST. @@ -1243,7 +1243,7 @@ timedelta}, default 'raise' * 'NaT' will return NaT for an ambiguous time. * 'raise' will raise an AmbiguousTimeError for an ambiguous time. - nonexistent : {'raise', 'shift_forward', 'shift_backward, 'NaT', \ + nonexistent : {'raise', 'shift_forward', 'shift_backward', 'NaT', \ timedelta}, default 'raise' A nonexistent time does not exist in a particular timezone where clocks moved forward due to DST. @@ -1407,7 +1407,7 @@ timedelta}, default 'raise' * 'NaT' will return NaT for an ambiguous time. * 'raise' will raise an AmbiguousTimeError for an ambiguous time. - nonexistent : 'shift_forward', 'shift_backward, 'NaT', timedelta, \ + nonexistent : 'shift_forward', 'shift_backward', 'NaT', timedelta, \ default 'raise' A nonexistent time does not exist in a particular timezone where clocks moved forward due to DST. diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index ea22429c56e6a..6779c8e7f44b0 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -2106,7 +2106,7 @@ class Timestamp(_Timestamp): * 'NaT' will return NaT for an ambiguous time. * 'raise' will raise an AmbiguousTimeError for an ambiguous time. - nonexistent : {'raise', 'shift_forward', 'shift_backward, 'NaT', \ + nonexistent : {'raise', 'shift_forward', 'shift_backward', 'NaT', \ timedelta}, default 'raise' A nonexistent time does not exist in a particular timezone where clocks moved forward due to DST. @@ -2209,7 +2209,7 @@ timedelta}, default 'raise' * 'NaT' will return NaT for an ambiguous time. * 'raise' will raise an AmbiguousTimeError for an ambiguous time. - nonexistent : {'raise', 'shift_forward', 'shift_backward, 'NaT', \ + nonexistent : {'raise', 'shift_forward', 'shift_backward', 'NaT', \ timedelta}, default 'raise' A nonexistent time does not exist in a particular timezone where clocks moved forward due to DST. @@ -2304,7 +2304,7 @@ timedelta}, default 'raise' * 'NaT' will return NaT for an ambiguous time. * 'raise' will raise an AmbiguousTimeError for an ambiguous time. - nonexistent : {'raise', 'shift_forward', 'shift_backward, 'NaT', \ + nonexistent : {'raise', 'shift_forward', 'shift_backward', 'NaT', \ timedelta}, default 'raise' A nonexistent time does not exist in a particular timezone where clocks moved forward due to DST. diff --git a/pandas/tests/scalar/test_nat.py b/pandas/tests/scalar/test_nat.py index b20df43dd49a6..e1e1d879552bc 100644 --- a/pandas/tests/scalar/test_nat.py +++ b/pandas/tests/scalar/test_nat.py @@ -332,6 +332,7 @@ def test_nat_doc_strings(compare): pytest.skip(f"different docstring for {method} is intentional") nat_doc = getattr(NaT, method).__doc__ + print(nat_doc) assert klass_doc == nat_doc From 33851828f1b0f32409d4cd8eacd7c2eab1d5e8cc Mon Sep 17 00:00:00 2001 From: Rob <124158982+rob-sil@users.noreply.github.com> Date: Sat, 10 Aug 2024 16:20:22 -0700 Subject: [PATCH 3/3] Clean up a print statement --- pandas/tests/scalar/test_nat.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pandas/tests/scalar/test_nat.py b/pandas/tests/scalar/test_nat.py index e1e1d879552bc..b20df43dd49a6 100644 --- a/pandas/tests/scalar/test_nat.py +++ b/pandas/tests/scalar/test_nat.py @@ -332,7 +332,6 @@ def test_nat_doc_strings(compare): pytest.skip(f"different docstring for {method} is intentional") nat_doc = getattr(NaT, method).__doc__ - print(nat_doc) assert klass_doc == nat_doc