Skip to content

Commit 3776f2c

Browse files
committed
Fixed issue with incorrect types
1 parent 09e16c8 commit 3776f2c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/io/json/_json.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def to_json(
114114
indent: int = ...,
115115
storage_options: StorageOptions = ...,
116116
mode: Literal["a", "w"] = ...,
117-
escape_forward_slashes: bool | True = ...,
117+
escape_forward_slashes: Literal[True, False] = ...,
118118
) -> None: ...
119119

120120

@@ -134,9 +134,10 @@ def to_json(
134134
indent: int = ...,
135135
storage_options: StorageOptions = ...,
136136
mode: Literal["a", "w"] = ...,
137-
escape_forward_slashes: bool | True = ...,
137+
escape_forward_slashes: Literal[True, False] = ...,
138138
) -> str: ...
139139

140+
140141
def to_json(
141142
path_or_buf: FilePath | WriteBuffer[str] | WriteBuffer[bytes] | None,
142143
obj: NDFrame,
@@ -152,7 +153,7 @@ def to_json(
152153
indent: int = 0,
153154
storage_options: StorageOptions | None = None,
154155
mode: Literal["a", "w"] = "w",
155-
escape_forward_slashes: bool | True = ...,
156+
escape_forward_slashes: Literal[True, False] = Literal[True],
156157
) -> str | None:
157158
if orient in ["records", "values"] and index is True:
158159
raise ValueError(

0 commit comments

Comments
 (0)