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,29 +1,29 @@
import sys
from typing import IO, Dict, List, Sequence, Text, Tuple
from typing import IO, Sequence, Text
def guess_type(url: Text, strict: bool = ...) -> Tuple[str | None, str | None]: ...
def guess_all_extensions(type: str, strict: bool = ...) -> List[str]: ...
def guess_type(url: Text, strict: bool = ...) -> tuple[str | None, str | None]: ...
def guess_all_extensions(type: str, strict: bool = ...) -> list[str]: ...
def guess_extension(type: str, strict: bool = ...) -> str | None: ...
def init(files: Sequence[str] | None = ...) -> None: ...
def read_mime_types(file: str) -> Dict[str, str] | None: ...
def read_mime_types(file: str) -> dict[str, str] | None: ...
def add_type(type: str, ext: str, strict: bool = ...) -> None: ...
inited: bool
knownfiles: List[str]
suffix_map: Dict[str, str]
encodings_map: Dict[str, str]
types_map: Dict[str, str]
common_types: Dict[str, str]
knownfiles: list[str]
suffix_map: dict[str, str]
encodings_map: dict[str, str]
types_map: dict[str, str]
common_types: dict[str, str]
class MimeTypes:
suffix_map: Dict[str, str]
encodings_map: Dict[str, str]
types_map: Tuple[Dict[str, str], Dict[str, str]]
types_map_inv: Tuple[Dict[str, str], Dict[str, str]]
def __init__(self, filenames: Tuple[str, ...] = ..., strict: bool = ...) -> None: ...
suffix_map: dict[str, str]
encodings_map: dict[str, str]
types_map: tuple[dict[str, str], dict[str, str]]
types_map_inv: tuple[dict[str, str], dict[str, str]]
def __init__(self, filenames: tuple[str, ...] = ..., strict: bool = ...) -> None: ...
def guess_extension(self, type: str, strict: bool = ...) -> str | None: ...
def guess_type(self, url: str, strict: bool = ...) -> Tuple[str | None, str | None]: ...
def guess_all_extensions(self, type: str, strict: bool = ...) -> List[str]: ...
def guess_type(self, url: str, strict: bool = ...) -> tuple[str | None, str | None]: ...
def guess_all_extensions(self, type: str, strict: bool = ...) -> list[str]: ...
def read(self, filename: str, strict: bool = ...) -> None: ...
def readfp(self, fp: IO[str], strict: bool = ...) -> None: ...
if sys.platform == "win32":