mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-24 12:01: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 Any, AnyStr, Iterable, List, Mapping, Sequence, Text, Tuple, overload
|
||||
from typing import Any, AnyStr, Iterable, Mapping, Sequence, Text, overload
|
||||
|
||||
ascii_letters: str
|
||||
ascii_lowercase: str
|
||||
@@ -27,9 +27,9 @@ def index(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ..
|
||||
def rindex(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ...
|
||||
def count(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ...
|
||||
def lower(s: AnyStr) -> AnyStr: ...
|
||||
def split(s: AnyStr, sep: AnyStr = ..., maxsplit: int = ...) -> List[AnyStr]: ...
|
||||
def rsplit(s: AnyStr, sep: AnyStr = ..., maxsplit: int = ...) -> List[AnyStr]: ...
|
||||
def splitfields(s: AnyStr, sep: AnyStr = ..., maxsplit: int = ...) -> List[AnyStr]: ...
|
||||
def split(s: AnyStr, sep: AnyStr = ..., maxsplit: int = ...) -> list[AnyStr]: ...
|
||||
def rsplit(s: AnyStr, sep: AnyStr = ..., maxsplit: int = ...) -> list[AnyStr]: ...
|
||||
def splitfields(s: AnyStr, sep: AnyStr = ..., maxsplit: int = ...) -> list[AnyStr]: ...
|
||||
def join(words: Iterable[AnyStr], sep: AnyStr = ...) -> AnyStr: ...
|
||||
def joinfields(word: Iterable[AnyStr], sep: AnyStr = ...) -> AnyStr: ...
|
||||
def lstrip(s: AnyStr, chars: AnyStr = ...) -> AnyStr: ...
|
||||
@@ -60,7 +60,7 @@ class Template:
|
||||
class Formatter(object):
|
||||
def format(self, format_string: str, *args, **kwargs) -> str: ...
|
||||
def vformat(self, format_string: str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> str: ...
|
||||
def parse(self, format_string: str) -> Iterable[Tuple[str, str, str, str]]: ...
|
||||
def parse(self, format_string: str) -> Iterable[tuple[str, str, str, str]]: ...
|
||||
def get_field(self, field_name: str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> Any: ...
|
||||
def get_value(self, key: int | str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> Any: ...
|
||||
def check_unused_args(self, used_args: Sequence[int | str], args: Sequence[Any], kwargs: Mapping[str, Any]) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user