Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -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: ...