mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
* Stubgen modules for 2.7
Cookie
email._parseaddr
email.utils
genericpath
linecache
mimetypes
multiprocessing
multiprocessing.process
multiprocessing.util
posixpath
quopri
runpy
weakref
wsgiref.validate
* 2.7/typing.py: add missing __contains__ definition
* 2.7/subprocess.py: make output argument to CalledProcessError optional
Commit f08160bd did the same for py3.
* 2.7/hmac.pyi: add compare_digest
This function was introduced to the 2.7 series in 2.7.7.
* Stubgen 2.7/ssl.pyi
This replaces a nearly-empty handwritten stub.
* Copy constants and other definitions from py3 to py2 ssl.pyi
* 2.7/__future__.pyi: add methods
* 2.7/_weakref.pyi: backport some definitions from 3.x version
* Stubgen 2.7/locale.pyi
Hand-edited to remove declarations that are redundant (and cause
conflicts with) the "from _locale import *" line.
27 lines
934 B
Python
27 lines
934 B
Python
# Stubs for mimetypes (Python 2)
|
|
#
|
|
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
|
|
from typing import Any
|
|
|
|
class MimeTypes:
|
|
encodings_map = ... # type: Any
|
|
suffix_map = ... # type: Any
|
|
types_map = ... # type: Any
|
|
types_map_inv = ... # type: Any
|
|
def __init__(self, filenames=..., strict=True): ...
|
|
def add_type(self, type, ext, strict=True): ...
|
|
def guess_type(self, url, strict=True): ...
|
|
def guess_all_extensions(self, type, strict=True): ...
|
|
def guess_extension(self, type, strict=True): ...
|
|
def read(self, filename, strict=True): ...
|
|
def readfp(self, fp, strict=True): ...
|
|
def read_windows_registry(self, strict=True): ...
|
|
|
|
def guess_type(url, strict=True): ...
|
|
def guess_all_extensions(type, strict=True): ...
|
|
def guess_extension(type, strict=True): ...
|
|
def add_type(type, ext, strict=True): ...
|
|
def init(files=None): ...
|
|
def read_mime_types(file): ...
|