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,4 +1,4 @@
from typing import Callable, Dict, List, Optional, Pattern
from typing import Callable, Dict, List, Pattern
class TextWrapper:
width: int = ...
@@ -11,7 +11,7 @@ class TextWrapper:
break_long_words: bool = ...
break_on_hyphens: bool = ...
tabsize: int = ...
max_lines: Optional[int] = ...
max_lines: int | None = ...
placeholder: str = ...
# Attributes not present in documentation
@@ -35,7 +35,7 @@ class TextWrapper:
break_on_hyphens: bool = ...,
tabsize: int = ...,
*,
max_lines: Optional[int] = ...,
max_lines: int | None = ...,
placeholder: str = ...,
) -> None: ...
# Private methods *are* part of the documented API for subclasses.
@@ -97,4 +97,4 @@ def shorten(
placeholder: str = ...,
) -> str: ...
def dedent(text: str) -> str: ...
def indent(text: str, prefix: str, predicate: Optional[Callable[[str], bool]] = ...) -> str: ...
def indent(text: str, prefix: str, predicate: Callable[[str], bool] | None = ...) -> str: ...