mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import sys
|
||||
from typing import IO, Any, Dict, Optional, Tuple
|
||||
from typing import IO, Any, Dict, Tuple
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
def pformat(
|
||||
object: object,
|
||||
indent: int = ...,
|
||||
width: int = ...,
|
||||
depth: Optional[int] = ...,
|
||||
depth: int | None = ...,
|
||||
*,
|
||||
compact: bool = ...,
|
||||
sort_dicts: bool = ...,
|
||||
@@ -18,24 +18,22 @@ elif sys.version_info >= (3, 8):
|
||||
object: object,
|
||||
indent: int = ...,
|
||||
width: int = ...,
|
||||
depth: Optional[int] = ...,
|
||||
depth: int | None = ...,
|
||||
*,
|
||||
compact: bool = ...,
|
||||
sort_dicts: bool = ...,
|
||||
) -> str: ...
|
||||
|
||||
else:
|
||||
def pformat(
|
||||
object: object, indent: int = ..., width: int = ..., depth: Optional[int] = ..., *, compact: bool = ...
|
||||
) -> str: ...
|
||||
def pformat(object: object, indent: int = ..., width: int = ..., depth: int | None = ..., *, compact: bool = ...) -> str: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
def pp(
|
||||
object: object,
|
||||
stream: Optional[IO[str]] = ...,
|
||||
stream: IO[str] | None = ...,
|
||||
indent: int = ...,
|
||||
width: int = ...,
|
||||
depth: Optional[int] = ...,
|
||||
depth: int | None = ...,
|
||||
*,
|
||||
compact: bool = ...,
|
||||
sort_dicts: bool = ...,
|
||||
@@ -45,10 +43,10 @@ if sys.version_info >= (3, 10):
|
||||
elif sys.version_info >= (3, 8):
|
||||
def pp(
|
||||
object: object,
|
||||
stream: Optional[IO[str]] = ...,
|
||||
stream: IO[str] | None = ...,
|
||||
indent: int = ...,
|
||||
width: int = ...,
|
||||
depth: Optional[int] = ...,
|
||||
depth: int | None = ...,
|
||||
*,
|
||||
compact: bool = ...,
|
||||
sort_dicts: bool = ...,
|
||||
@@ -57,10 +55,10 @@ elif sys.version_info >= (3, 8):
|
||||
if sys.version_info >= (3, 10):
|
||||
def pprint(
|
||||
object: object,
|
||||
stream: Optional[IO[str]] = ...,
|
||||
stream: IO[str] | None = ...,
|
||||
indent: int = ...,
|
||||
width: int = ...,
|
||||
depth: Optional[int] = ...,
|
||||
depth: int | None = ...,
|
||||
*,
|
||||
compact: bool = ...,
|
||||
sort_dicts: bool = ...,
|
||||
@@ -70,10 +68,10 @@ if sys.version_info >= (3, 10):
|
||||
elif sys.version_info >= (3, 8):
|
||||
def pprint(
|
||||
object: object,
|
||||
stream: Optional[IO[str]] = ...,
|
||||
stream: IO[str] | None = ...,
|
||||
indent: int = ...,
|
||||
width: int = ...,
|
||||
depth: Optional[int] = ...,
|
||||
depth: int | None = ...,
|
||||
*,
|
||||
compact: bool = ...,
|
||||
sort_dicts: bool = ...,
|
||||
@@ -82,10 +80,10 @@ elif sys.version_info >= (3, 8):
|
||||
else:
|
||||
def pprint(
|
||||
object: object,
|
||||
stream: Optional[IO[str]] = ...,
|
||||
stream: IO[str] | None = ...,
|
||||
indent: int = ...,
|
||||
width: int = ...,
|
||||
depth: Optional[int] = ...,
|
||||
depth: int | None = ...,
|
||||
*,
|
||||
compact: bool = ...,
|
||||
) -> None: ...
|
||||
@@ -100,8 +98,8 @@ class PrettyPrinter:
|
||||
self,
|
||||
indent: int = ...,
|
||||
width: int = ...,
|
||||
depth: Optional[int] = ...,
|
||||
stream: Optional[IO[str]] = ...,
|
||||
depth: int | None = ...,
|
||||
stream: IO[str] | None = ...,
|
||||
*,
|
||||
compact: bool = ...,
|
||||
sort_dicts: bool = ...,
|
||||
@@ -112,8 +110,8 @@ class PrettyPrinter:
|
||||
self,
|
||||
indent: int = ...,
|
||||
width: int = ...,
|
||||
depth: Optional[int] = ...,
|
||||
stream: Optional[IO[str]] = ...,
|
||||
depth: int | None = ...,
|
||||
stream: IO[str] | None = ...,
|
||||
*,
|
||||
compact: bool = ...,
|
||||
sort_dicts: bool = ...,
|
||||
@@ -123,8 +121,8 @@ class PrettyPrinter:
|
||||
self,
|
||||
indent: int = ...,
|
||||
width: int = ...,
|
||||
depth: Optional[int] = ...,
|
||||
stream: Optional[IO[str]] = ...,
|
||||
depth: int | None = ...,
|
||||
stream: IO[str] | None = ...,
|
||||
*,
|
||||
compact: bool = ...,
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user