Skip to content

Commit

Permalink
rename the parameter name of from_json_dict() to match python
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Nov 26, 2023
1 parent 9dfeff7 commit 936ae74
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 76 deletions.
5 changes: 3 additions & 2 deletions chia_py_streamable_macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ pub fn py_streamable_macro(input: proc_macro::TokenStream) -> proc_macro::TokenS
#[pyo3::pymethods]
impl #ident {
#[staticmethod]
pub fn from_json_dict(o: &pyo3::PyAny) -> pyo3::PyResult<Self> {
<Self as #crate_name::from_json_dict::FromJsonDict>::from_json_dict(o)
#[pyo3(signature=(json_dict))]
pub fn from_json_dict(json_dict: &pyo3::PyAny) -> pyo3::PyResult<Self> {
<Self as #crate_name::from_json_dict::FromJsonDict>::from_json_dict(json_dict)
}

pub fn to_json_dict(&self, py: pyo3::Python) -> pyo3::PyResult<pyo3::PyObject> {
Expand Down
Loading

0 comments on commit 936ae74

Please sign in to comment.