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,9 +1,9 @@
import sys
from _typeshed import FileDescriptorLike
from typing import Any, List, Union
from typing import Any, Union
if sys.platform != "win32":
_Attr = List[Union[int, List[Union[bytes, int]]]]
_Attr = list[Union[int, list[Union[bytes, int]]]]
# TODO constants not really documented
B0: int
@@ -237,7 +237,7 @@ if sys.platform != "win32":
VWERASE: int
XCASE: int
XTABS: int
def tcgetattr(__fd: FileDescriptorLike) -> List[Any]: ...
def tcgetattr(__fd: FileDescriptorLike) -> list[Any]: ...
def tcsetattr(__fd: FileDescriptorLike, __when: int, __attributes: _Attr) -> None: ...
def tcsendbreak(__fd: FileDescriptorLike, __duration: int) -> None: ...
def tcdrain(__fd: FileDescriptorLike) -> None: ...