Use PEP 585 syntax wherever possible (#6717)

This commit is contained in:
Alex Waygood
2021-12-28 11:31:43 +01:00
committed by GitHub
parent e6cb341d94
commit 8d5d2520ac
237 changed files with 966 additions and 1069 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import sys
from _typeshed import StrPath
from typing import IO, Sequence, Tuple
from typing import IO, Sequence
if sys.version_info >= (3, 8):
def guess_type(url: StrPath, strict: bool = ...) -> tuple[str | None, str | None]: ...
@@ -26,7 +26,7 @@ class MimeTypes:
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 __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]: ...