Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)

This commit is contained in:
Alex Waygood
2022-01-18 15:14:03 +00:00
committed by GitHub
parent aa885ecd65
commit 8af5e0d340
264 changed files with 2217 additions and 2411 deletions

View File

@@ -1,4 +1,4 @@
from typing import List, Sequence
from typing import Sequence
lowercase: str
uppercase: str
@@ -19,8 +19,8 @@ def maketrans(frm: str, to: str) -> str: ...
def replace(s: str, old: str, new: str, maxsplit: int = ...) -> str: ...
def rfind(s: str, sub: str, start: int = ..., end: int = ...) -> int: ...
def rstrip(s: str) -> str: ...
def split(s: str, sep: str, maxsplit: int = ...) -> List[str]: ...
def splitfields(s: str, sep: str, maxsplit: int = ...) -> List[str]: ...
def split(s: str, sep: str, maxsplit: int = ...) -> list[str]: ...
def splitfields(s: str, sep: str, maxsplit: int = ...) -> list[str]: ...
def strip(s: str) -> str: ...
def swapcase(s: str) -> str: ...
def translate(s: str, table: str, deletechars: str = ...) -> str: ...