Skip to content

Commit

Permalink
feat: allow classmethods to receive Py<PyType>
Browse files Browse the repository at this point in the history
 This is necessary for async classmethods
  • Loading branch information
Joseph Perez committed Nov 20, 2023
1 parent c8fdb80 commit 6b1fbcc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyo3-macros-backend/src/method.rs
Expand Up @@ -113,7 +113,8 @@ impl FnType {
}
FnType::FnClass | FnType::FnNewClass => {
quote! {
_pyo3::types::PyType::from_type_ptr(py, _slf as *mut _pyo3::ffi::PyTypeObject),
#[allow(clippy::useless_conversion)]
::std::convert::Into::into(_pyo3::types::PyType::from_type_ptr(py, _slf as *mut _pyo3::ffi::PyTypeObject))
}
}
FnType::FnModule => {
Expand Down

0 comments on commit 6b1fbcc

Please sign in to comment.