mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import AnyStr, Dict, List, Pattern
|
||||
from typing import AnyStr, Pattern
|
||||
|
||||
class TextWrapper(object):
|
||||
width: int = ...
|
||||
@@ -16,7 +16,7 @@ class TextWrapper(object):
|
||||
wordsep_re: Pattern[str] = ...
|
||||
wordsep_simple_re: Pattern[str] = ...
|
||||
whitespace_trans: str = ...
|
||||
unicode_whitespace_trans: Dict[int, int] = ...
|
||||
unicode_whitespace_trans: dict[int, int] = ...
|
||||
uspace: int = ...
|
||||
x: int = ...
|
||||
def __init__(
|
||||
@@ -31,7 +31,7 @@ class TextWrapper(object):
|
||||
drop_whitespace: bool = ...,
|
||||
break_on_hyphens: bool = ...,
|
||||
) -> None: ...
|
||||
def wrap(self, text: AnyStr) -> List[AnyStr]: ...
|
||||
def wrap(self, text: AnyStr) -> list[AnyStr]: ...
|
||||
def fill(self, text: AnyStr) -> AnyStr: ...
|
||||
|
||||
def wrap(
|
||||
@@ -45,7 +45,7 @@ def wrap(
|
||||
break_long_words: bool = ...,
|
||||
drop_whitespace: bool = ...,
|
||||
break_on_hyphens: bool = ...,
|
||||
) -> List[AnyStr]: ...
|
||||
) -> list[AnyStr]: ...
|
||||
def fill(
|
||||
text: AnyStr,
|
||||
width: int = ...,
|
||||
|
||||
Reference in New Issue
Block a user