Use PEP 585 syntax wherever possible (#6717)

This commit is contained in:
Alex Waygood
2021-12-28 10:31:43 +00:00
committed by GitHub
parent e6cb341d94
commit 8d5d2520ac
237 changed files with 966 additions and 1069 deletions

View File

@@ -3,7 +3,7 @@ import socket
import ssl
import sys
from _typeshed import Self
from typing import IO, Any, Iterable, NamedTuple, Tuple, Union
from typing import IO, Any, Iterable, NamedTuple, Union
_File = Union[IO[bytes], bytes, str, None]
@@ -72,7 +72,7 @@ class _NNTPBase:
def xhdr(self, hdr: str, str: Any, *, file: _File = ...) -> tuple[str, _list[str]]: ...
def xover(self, start: int, end: int, *, file: _File = ...) -> tuple[str, _list[tuple[int, dict[str, str]]]]: ...
def over(
self, message_spec: None | str | _list[Any] | Tuple[Any, ...], *, file: _File = ...
self, message_spec: None | str | _list[Any] | tuple[Any, ...], *, file: _File = ...
) -> tuple[str, _list[tuple[int, dict[str, str]]]]: ...
if sys.version_info < (3, 9):
def xgtitle(self, group: str, *, file: _File = ...) -> tuple[str, _list[tuple[str, str]]]: ...