mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user