Skip to content

Commit 52036d9

Browse files
authored
Typo: 'whenlines' -> 'when lines' (#55233)
1 parent 2a08b05 commit 52036d9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/io/json/_json.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def to_json(
175175

176176
if mode == "a" and (not lines or orient != "records"):
177177
msg = (
178-
"mode='a' (append) is only supported when"
178+
"mode='a' (append) is only supported when "
179179
"lines is True and orient is 'records'"
180180
)
181181
raise ValueError(msg)

pandas/tests/io/json/test_readlines.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def test_to_json_append_orient(orient_):
399399
# Test ValueError when orient is not 'records'
400400
df = DataFrame({"col1": [1, 2], "col2": ["a", "b"]})
401401
msg = (
402-
r"mode='a' \(append\) is only supported when"
402+
r"mode='a' \(append\) is only supported when "
403403
"lines is True and orient is 'records'"
404404
)
405405
with pytest.raises(ValueError, match=msg):
@@ -411,7 +411,7 @@ def test_to_json_append_lines():
411411
# Test ValueError when lines is not True
412412
df = DataFrame({"col1": [1, 2], "col2": ["a", "b"]})
413413
msg = (
414-
r"mode='a' \(append\) is only supported when"
414+
r"mode='a' \(append\) is only supported when "
415415
"lines is True and orient is 'records'"
416416
)
417417
with pytest.raises(ValueError, match=msg):

0 commit comments

Comments
 (0)