mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
math, mimetypes, mmap, multiprocessing, sqlite: Python 3.13 updates (#12062)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
from _typeshed import StrPath
|
||||
from collections.abc import Sequence
|
||||
from typing import IO
|
||||
@@ -18,6 +19,9 @@ __all__ = [
|
||||
"common_types",
|
||||
]
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
__all__ += ["guess_file_type"]
|
||||
|
||||
def guess_type(url: StrPath, strict: bool = True) -> tuple[str | None, str | None]: ...
|
||||
def guess_all_extensions(type: str, strict: bool = True) -> list[str]: ...
|
||||
def guess_extension(type: str, strict: bool = True) -> str | None: ...
|
||||
@@ -25,6 +29,9 @@ def init(files: Sequence[str] | None = None) -> None: ...
|
||||
def read_mime_types(file: str) -> dict[str, str] | None: ...
|
||||
def add_type(type: str, ext: str, strict: bool = True) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
def guess_file_type(path: StrPath, *, strict: bool = True) -> tuple[str | None, str | None]: ...
|
||||
|
||||
inited: bool
|
||||
knownfiles: list[str]
|
||||
suffix_map: dict[str, str]
|
||||
@@ -44,3 +51,5 @@ class MimeTypes:
|
||||
def read(self, filename: str, strict: bool = True) -> None: ...
|
||||
def readfp(self, fp: IO[str], strict: bool = True) -> None: ...
|
||||
def read_windows_registry(self, strict: bool = True) -> None: ...
|
||||
if sys.version_info >= (3, 13):
|
||||
def guess_file_type(self, path: StrPath, *, strict: bool = True) -> tuple[str | None, str | None]: ...
|
||||
|
||||
Reference in New Issue
Block a user