From 57f151de1c005df2787312376aa9e888fe0f4425 Mon Sep 17 00:00:00 2001 From: Santhosh Date: Sun, 26 May 2024 08:47:47 -0400 Subject: [PATCH 1/4] upadting doc string --- pandas/tests/arithmetic/common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/tests/arithmetic/common.py b/pandas/tests/arithmetic/common.py index d7a8b0510b50f..8a17908547c2c 100644 --- a/pandas/tests/arithmetic/common.py +++ b/pandas/tests/arithmetic/common.py @@ -20,7 +20,7 @@ def assert_cannot_add(left, right, msg="cannot add"): """ - Helper to assert that left and right cannot be added. + Helper function to assert that two objects cannot be added. Parameters ---------- @@ -36,7 +36,8 @@ def assert_cannot_add(left, right, msg="cannot add"): def assert_invalid_addsub_type(left, right, msg=None): """ - Helper to assert that left and right can be neither added nor subtracted. + Helper function to assert that two objects can + neither be added nor subtracted. Parameters ---------- From b277ed203ae0bd52acef2f32d08149c32398b25d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 26 May 2024 12:56:38 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pandas/tests/arithmetic/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/arithmetic/common.py b/pandas/tests/arithmetic/common.py index 8a17908547c2c..1ec40af62fc12 100644 --- a/pandas/tests/arithmetic/common.py +++ b/pandas/tests/arithmetic/common.py @@ -36,7 +36,7 @@ def assert_cannot_add(left, right, msg="cannot add"): def assert_invalid_addsub_type(left, right, msg=None): """ - Helper function to assert that two objects can + Helper function to assert that two objects can neither be added nor subtracted. Parameters From 41ee627a2533cd58c32c0266e80e6d494c4b853d Mon Sep 17 00:00:00 2001 From: Santhosh Date: Sun, 26 May 2024 09:48:37 -0400 Subject: [PATCH 3/4] Empty-Commit From aa03d1264f35acb3f45a3c1930c7c5290867995e Mon Sep 17 00:00:00 2001 From: Santhosh Date: Wed, 29 May 2024 17:47:22 -0400 Subject: [PATCH 4/4] updating doc string :msg --- pandas/tests/arithmetic/common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandas/tests/arithmetic/common.py b/pandas/tests/arithmetic/common.py index 1ec40af62fc12..0730729e2fd94 100644 --- a/pandas/tests/arithmetic/common.py +++ b/pandas/tests/arithmetic/common.py @@ -25,8 +25,11 @@ def assert_cannot_add(left, right, msg="cannot add"): Parameters ---------- left : object + The first operand. right : object + The second operand. msg : str, default "cannot add" + The error message expected in the TypeError. """ with pytest.raises(TypeError, match=msg): left + right @@ -42,8 +45,11 @@ def assert_invalid_addsub_type(left, right, msg=None): Parameters ---------- left : object + The first operand. right : object + The second operand. msg : str or None, default None + The error message expected in the TypeError. """ with pytest.raises(TypeError, match=msg): left + right