summaryrefslogtreecommitdiff
path: root/magic/__init__.pyi
diff options
context:
space:
mode:
Diffstat (limited to 'magic/__init__.pyi')
-rw-r--r--magic/__init__.pyi5
1 files changed, 3 insertions, 2 deletions
diff --git a/magic/__init__.pyi b/magic/__init__.pyi
index 8d5f38f..b6b5489 100644
--- a/magic/__init__.pyi
+++ b/magic/__init__.pyi
@@ -1,6 +1,7 @@
import ctypes.util
import threading
from typing import Any, Text, Optional, Union
+from os import PathLike
class MagicException(Exception):
message: Any = ...
@@ -12,13 +13,13 @@ class Magic:
lock: threading.Lock = ...
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_file(self, filename: Union[bytes, str, PathLike]) -> 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_file(filename: Union[bytes, str, PathLike], mime: bool = ...) -> Text: ...
def from_buffer(buffer: Union[bytes, str], mime: bool = ...) -> Text: ...
def from_descriptor(fd: int, mime: bool = ...) -> Text: ...