Skip to content

Commit

Permalink
Merge pull request #41 from opentensor/fix/roman/keyfile-add-getter-k…
Browse files Browse the repository at this point in the history
…eypair

add keypair getter to Keyfile
  • Loading branch information
roman-opentensor authored Oct 4, 2024
2 parents df101ac + a72455c commit 2bc0990
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/keyfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool>{
// self.get_keypair(None, py)
// }
#[getter(keypair)]
pub fn keypair_py(&self, py: Python) -> PyResult<Keypair>{
self.get_keypair(None, py)
}

/// Returns the keypair from the path, decrypts data if the file is encrypted.
#[pyo3(signature = (password = None))]
Expand Down

0 comments on commit 2bc0990

Please sign in to comment.