Skip to content

Commit f95c3a0

Browse files
upadting doc string (#58830)
* upadting doc string * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Empty-Commit * updating doc string :msg --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 528d176 commit f95c3a0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pandas/tests/arithmetic/common.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@
2020

2121
def assert_cannot_add(left, right, msg="cannot add"):
2222
"""
23-
Helper to assert that left and right cannot be added.
23+
Helper function to assert that two objects cannot be added.
2424
2525
Parameters
2626
----------
2727
left : object
28+
The first operand.
2829
right : object
30+
The second operand.
2931
msg : str, default "cannot add"
32+
The error message expected in the TypeError.
3033
"""
3134
with pytest.raises(TypeError, match=msg):
3235
left + right
@@ -36,13 +39,17 @@ def assert_cannot_add(left, right, msg="cannot add"):
3639

3740
def assert_invalid_addsub_type(left, right, msg=None):
3841
"""
39-
Helper to assert that left and right can be neither added nor subtracted.
42+
Helper function to assert that two objects can
43+
neither be added nor subtracted.
4044
4145
Parameters
4246
----------
4347
left : object
48+
The first operand.
4449
right : object
50+
The second operand.
4551
msg : str or None, default None
52+
The error message expected in the TypeError.
4653
"""
4754
with pytest.raises(TypeError, match=msg):
4855
left + right

0 commit comments

Comments
 (0)