diff --git a/stubs/passpy/@tests/stubtest_allowlist.txt b/stubs/passpy/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..f7e53b666 --- /dev/null +++ b/stubs/passpy/@tests/stubtest_allowlist.txt @@ -0,0 +1,6 @@ +passpy.__main__ + +# Uses `git` dependency: +passpy.git +# Uses `gpg` dependency: +passpy.gpg diff --git a/stubs/passpy/METADATA.toml b/stubs/passpy/METADATA.toml index f3e83f9c4..516f11f6b 100644 --- a/stubs/passpy/METADATA.toml +++ b/stubs/passpy/METADATA.toml @@ -1 +1,4 @@ version = "1.0.*" + +[tool.stubtest] +ignore_missing_stub = false diff --git a/stubs/passpy/passpy/util.pyi b/stubs/passpy/passpy/util.pyi index e76e8abca..4c10cdeaa 100644 --- a/stubs/passpy/passpy/util.pyi +++ b/stubs/passpy/passpy/util.pyi @@ -1 +1,13 @@ +from collections.abc import Callable +from typing import Any, TypeVar + +_C = TypeVar("_C", bound=Callable[..., Any]) + +# Technically, the first argument of `_C` must be `Store`, +# but for now we leave it simple: +def initialised(func: _C) -> _C: ... +def trap(path_index: str | int) -> Callable[[_C], _C]: ... def gen_password(length: int, symbols: bool = ...) -> str: ... +def copy_move( + src: str, dst: str, force: bool = ..., move: bool = ..., interactive: bool = ..., verbose: bool = ... +) -> str | None: ...