diff --git a/pyrightconfig.stricter.json b/pyrightconfig.stricter.json index ca21a886d..0ca5a6161 100644 --- a/pyrightconfig.stricter.json +++ b/pyrightconfig.stricter.json @@ -68,7 +68,6 @@ "stubs/PyYAML", "stubs/redis", "stubs/requests", - "stubs/Send2Trash", "stubs/setuptools", "stubs/slumber", "stubs/SQLAlchemy", diff --git a/stubs/Send2Trash/send2trash/exceptions.pyi b/stubs/Send2Trash/send2trash/exceptions.pyi index 7e2ca98b7..a263f6551 100644 --- a/stubs/Send2Trash/send2trash/exceptions.pyi +++ b/stubs/Send2Trash/send2trash/exceptions.pyi @@ -1,2 +1,5 @@ +from typing import Any + class TrashPermissionError(PermissionError): - def __init__(self, filename) -> None: ... + # Typed the same as `filename` in `PermissionError`: + def __init__(self, filename: Any) -> None: ... diff --git a/stubs/Send2Trash/send2trash/util.pyi b/stubs/Send2Trash/send2trash/util.pyi index e23e382a3..c89143c4f 100644 --- a/stubs/Send2Trash/send2trash/util.pyi +++ b/stubs/Send2Trash/send2trash/util.pyi @@ -1 +1,5 @@ -def preprocess_paths(paths): ... +from _typeshed import StrOrBytesPath +from typing import Any + +# Should be consistent with `__init__.py` +def preprocess_paths(paths: list[Any] | StrOrBytesPath) -> list[str | bytes]: ...