Reflect the latest reprlib updates (#9948)

This commit is contained in:
Andrew Svetlov
2023-03-27 14:15:02 +03:00
committed by GitHub
parent ccbe46173e
commit 3ce1d0203d

View File

@@ -1,3 +1,4 @@
import sys
from array import array
from collections import deque
from collections.abc import Callable
@@ -22,6 +23,30 @@ class Repr:
maxlong: int
maxstring: int
maxother: int
if sys.version_info >= (3, 11):
fillvalue: str
if sys.version_info >= (3, 12):
indent: str | int | None
if sys.version_info >= (3, 12):
def __init__(
self,
*,
maxlevel: int = 6,
maxtuple: int = 6,
maxlist: int = 6,
maxarray: int = 5,
maxdict: int = 4,
maxset: int = 6,
maxfrozenset: int = 6,
maxdeque: int = 6,
maxstring: int = 30,
maxlong: int = 40,
maxother: int = 30,
fillvalue: str = "...",
indent: str | int | None = None,
) -> None: ...
def repr(self, x: Any) -> str: ...
def repr1(self, x: Any, level: int) -> str: ...
def repr_tuple(self, x: tuple[Any, ...], level: int) -> str: ...