summaryrefslogtreecommitdiff
path: root/magic.pyi
diff options
context:
space:
mode:
authorAdam Hupp <adam@hupp.org>2020-12-11 11:57:07 -0800
committerGitHub <noreply@github.com>2020-12-11 11:57:07 -0800
commita96081edc65ddcf20599b3fa1ef72eb2c55f1055 (patch)
tree05c80abbc80da3c96184999a33524fc9b069cabe /magic.pyi
parent35026a19d6ff2b1934999ec6fb9c1812e4d4b07e (diff)
parentca14bfba7d1eeea543c9e00ea33d1487a49e68e0 (diff)
downloadpython-magic-a96081edc65ddcf20599b3fa1ef72eb2c55f1055.tar.gz
Merge pull request #227 from psrok1/magic-descriptor
Added support for magic_descriptor routine
Diffstat (limited to 'magic.pyi')
-rw-r--r--magic.pyi3
1 files changed, 3 insertions, 0 deletions
diff --git a/magic.pyi b/magic.pyi
index d0df01a..8d5f38f 100644
--- a/magic.pyi
+++ b/magic.pyi
@@ -13,12 +13,14 @@ class Magic:
def __init__(self, mime: bool = ..., magic_file: Optional[Any] = ..., mime_encoding: bool = ..., keep_going: bool = ..., uncompress: bool = ..., raw: bool = ...) -> None: ...
def from_buffer(self, buf: Union[bytes, str]) -> Text: ...
def from_file(self, filename: Union[bytes, str]) -> Text: ...
+ def from_descriptor(self, fd: int, mime: bool = ...) -> Text: ...
def setparam(self, param: Any, val: Any): ...
def getparam(self, param: Any): ...
def __del__(self) -> None: ...
def from_file(filename: Union[bytes, str], mime: bool = ...) -> Text: ...
def from_buffer(buffer: Union[bytes, str], mime: bool = ...) -> Text: ...
+def from_descriptor(fd: int, mime: bool = ...) -> Text: ...
libmagic: Any
dll: Any
@@ -39,6 +41,7 @@ magic_errno: Any
def magic_file(cookie: Any, filename: Any): ...
def magic_buffer(cookie: Any, buf: Any): ...
+def magic_descriptor(cookie: Any, fd: int): ...
def magic_load(cookie: Any, filename: Any): ...
magic_setflags: Any