mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Create send2trash stubs (#6000)
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
"stubs/redis",
|
||||
"stubs/requests",
|
||||
"stubs/selenium",
|
||||
"stubs/Send2Trash",
|
||||
"stubs/simplejson",
|
||||
"stubs/slumber",
|
||||
"stubs/stripe",
|
||||
|
||||
1
stubs/Send2Trash/METADATA.toml
Normal file
1
stubs/Send2Trash/METADATA.toml
Normal file
@@ -0,0 +1 @@
|
||||
version = "1.8"
|
||||
10
stubs/Send2Trash/send2trash/__init__.pyi
Normal file
10
stubs/Send2Trash/send2trash/__init__.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from _typeshed import StrOrBytesPath
|
||||
from typing import Any
|
||||
|
||||
from .exceptions import TrashPermissionError as TrashPermissionError
|
||||
|
||||
# The list should be list[StrOrBytesPath] but that doesn't work because invariance
|
||||
def send2trash(paths: list[Any] | StrOrBytesPath) -> None: ...
|
||||
|
||||
# Marked as incomplete because there are platform-specific plat_foo modules
|
||||
def __getattr__(name: str) -> Any: ... # incomplete
|
||||
6
stubs/Send2Trash/send2trash/compat.pyi
Normal file
6
stubs/Send2Trash/send2trash/compat.pyi
Normal file
@@ -0,0 +1,6 @@
|
||||
from typing import Any
|
||||
|
||||
PY3: Any
|
||||
text_type = str
|
||||
binary_type = bytes
|
||||
environb: Any
|
||||
2
stubs/Send2Trash/send2trash/exceptions.pyi
Normal file
2
stubs/Send2Trash/send2trash/exceptions.pyi
Normal file
@@ -0,0 +1,2 @@
|
||||
class TrashPermissionError(PermissionError):
|
||||
def __init__(self, filename) -> None: ...
|
||||
1
stubs/Send2Trash/send2trash/util.pyi
Normal file
1
stubs/Send2Trash/send2trash/util.pyi
Normal file
@@ -0,0 +1 @@
|
||||
def preprocess_paths(paths): ...
|
||||
Reference in New Issue
Block a user