Switch to PEP-604 syntax in python2 stubs (#5915)

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
Oleg Höfling
2021-08-14 11:12:30 +02:00
committed by GitHub
parent 431c4f7fc1
commit ff63953188
235 changed files with 2473 additions and 2768 deletions

View File

@@ -1,11 +1,11 @@
import sys
from typing import IO, Dict, List, Optional, Sequence, Text, Tuple
from typing import IO, Dict, List, Sequence, Text, Tuple
def guess_type(url: Text, strict: bool = ...) -> Tuple[Optional[str], Optional[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 = ...) -> Optional[str]: ...
def init(files: Optional[Sequence[str]] = ...) -> None: ...
def read_mime_types(file: str) -> Optional[Dict[str, 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 add_type(type: str, ext: str, strict: bool = ...) -> None: ...
inited: bool
@@ -21,8 +21,8 @@ class MimeTypes:
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 = ...) -> Optional[str]: ...
def guess_type(self, url: str, strict: bool = ...) -> Tuple[Optional[str], Optional[str]]: ...
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 read(self, filename: str, strict: bool = ...) -> None: ...
def readfp(self, fp: IO[str], strict: bool = ...) -> None: ...