From a72455cc246b66b1d9bde9a8a68873439ce7242e Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 4 Oct 2024 14:04:51 -0700 Subject: [PATCH] add keypair getter to Keyfile --- src/keyfile.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/keyfile.rs b/src/keyfile.rs index 49b4cef..51b17db 100644 --- a/src/keyfile.rs +++ b/src/keyfile.rs @@ -522,12 +522,11 @@ impl Keyfile { self.__str__(py) } - // TODO (devs): rust creates the same function automatically by `keypair` getter function and the error accuses. We need to understand how to avoid this. /// Returns the keypair from path, decrypts data if the file is encrypted. - // #[getter] - // pub fn keypair(&self, py: Python) -> PyResult{ - // self.get_keypair(None, py) - // } + #[getter(keypair)] + pub fn keypair_py(&self, py: Python) -> PyResult{ + self.get_keypair(None, py) + } /// Returns the keypair from the path, decrypts data if the file is encrypted. #[pyo3(signature = (password = None))]