mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-26 05:41:11 +08:00
adding stubs for passpy API (#6651)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
1
stubs/passpy/METADATA.toml
Normal file
1
stubs/passpy/METADATA.toml
Normal file
@@ -0,0 +1 @@
|
||||
version = "1.0.*"
|
||||
5
stubs/passpy/passpy/__init__.pyi
Normal file
5
stubs/passpy/passpy/__init__.pyi
Normal file
@@ -0,0 +1,5 @@
|
||||
from .exceptions import RecursiveCopyMoveError as RecursiveCopyMoveError, StoreNotInitialisedError as StoreNotInitialisedError
|
||||
from .store import Store as Store
|
||||
from .util import gen_password as gen_password
|
||||
|
||||
VERSION: str
|
||||
2
stubs/passpy/passpy/exceptions.pyi
Normal file
2
stubs/passpy/passpy/exceptions.pyi
Normal file
@@ -0,0 +1,2 @@
|
||||
class StoreNotInitialisedError(FileNotFoundError): ...
|
||||
class RecursiveCopyMoveError(OSError): ...
|
||||
31
stubs/passpy/passpy/store.pyi
Normal file
31
stubs/passpy/passpy/store.pyi
Normal file
@@ -0,0 +1,31 @@
|
||||
from _typeshed import StrPath
|
||||
from collections.abc import Iterator
|
||||
from typing import Match
|
||||
|
||||
class Store:
|
||||
def __init__(
|
||||
self,
|
||||
gpg_bin: str = ...,
|
||||
git_bin: str = ...,
|
||||
store_dir: str = ...,
|
||||
use_agent: bool = ...,
|
||||
interactive: bool = ...,
|
||||
verbose: bool = ...,
|
||||
) -> None: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def is_init(self) -> bool: ...
|
||||
def init_store(self, gpg_ids: None | str | list[str], path: StrPath | None = ...) -> None: ...
|
||||
def init_git(self) -> None: ...
|
||||
def git(self, method: str, *args: object, **kwargs: object) -> None: ...
|
||||
def get_key(self, path: StrPath | None) -> str | None: ...
|
||||
def set_key(self, path: StrPath | None, key_data: str, force: bool = ...) -> None: ...
|
||||
def remove_path(self, path: StrPath, recursive: bool = ..., force: bool = ...) -> None: ...
|
||||
def gen_key(
|
||||
self, path: StrPath | None, length: int, symbols: bool = ..., force: bool = ..., inplace: bool = ...
|
||||
) -> str | None: ...
|
||||
def copy_path(self, old_path: StrPath, new_path: StrPath, force: bool = ...) -> None: ...
|
||||
def move_path(self, old_path: StrPath, new_path: StrPath, force: bool = ...) -> None: ...
|
||||
def list_dir(self, path: StrPath) -> tuple[list[str], list[str]]: ...
|
||||
def iter_dir(self, path: StrPath) -> Iterator[str]: ...
|
||||
def find(self, names: None | str | list[str]) -> list[str]: ...
|
||||
def search(self, term: str) -> dict[str, list[tuple[str, Match[str]]]]: ...
|
||||
1
stubs/passpy/passpy/util.pyi
Normal file
1
stubs/passpy/passpy/util.pyi
Normal file
@@ -0,0 +1 @@
|
||||
def gen_password(length: int, symbols: bool = ...) -> str: ...
|
||||
Reference in New Issue
Block a user