def save_password(ident: str, details: Password, new_password: bool = False) -> None: password_store = PasswordStore() entries = password_store.load_for_modification() entries[ident] = details password_store.save(entries) _add_change(ident, change_type="new" if new_password else "edit")
def load_passwords_to_modify() -> Dict[str, Password]: password_store = PasswordStore() return password_store.load_for_modification()
def save_password(ident: str, details: Password, new_password=False): password_store = PasswordStore() entries = password_store.load_for_modification() entries[ident] = details password_store.save(entries) _add_change(ident, new_password=new_password)
def save_password(ident: str, details: PASSWORD): password_store = PasswordStore() entries = password_store.load_for_modification() entries[ident] = details password_store.save(entries)
def load_passwords_to_modify() -> dict[str, Password]: password_store = PasswordStore() return password_store.filter_editable_entries( password_store.load_for_modification())