Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f174355

Browse filesBrowse files
authored
Allow indent to be str in JSONEncoder (#9417)
1 parent 2704a8d commit f174355
Copy full SHA for f174355

1 file changed

+2-2Lines changed: 2 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎stdlib/json/encoder.pyi‎

Copy file name to clipboardExpand all lines: stdlib/json/encoder.pyi
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class JSONEncoder:
2020
check_circular: bool
2121
allow_nan: bool
2222
sort_keys: bool
23-
indent: int
23+
indent: int | str
2424
def __init__(
2525
self,
2626
*,
@@ -29,7 +29,7 @@ class JSONEncoder:
2929
check_circular: bool = ...,
3030
allow_nan: bool = ...,
3131
sort_keys: bool = ...,
32-
indent: int | None = ...,
32+
indent: int | str | None = ...,
3333
separators: tuple[str, str] | None = ...,
3434
default: Callable[..., Any] | None = ...,
3535
) -> None: ...

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.