You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since capitalization style between initialisms differs between python (prefer QCSError), and rust (prefer QcsError) it would be nice to have a similar pattern to py_wrap_type to make an alias:
use rigetti_pyo3::{py_wrap_error, wrap_error, create_init_submodule};use pyo3::exceptions::{PyRuntimeError};wrap_error!(ClientError(some_other_mod::ClientError)as"QCSClientError"// <-- feels most similar to other patterns);py_wrap_error!(
this_mod,
ClientError,
QcsClientError, // <-- in its current state, the internal `pyo3::crate_exception!` annotates this with// `#[allow(non_camel_case_types)]` so it is acceptable to use `QCSClientError` here// without any changes.PyRuntimeError,
// <-- the internal `pyo3::create_exception!` macro takes an optional `doc` parameter// that we aren't using, some potential re-use there. );create_init_submodule!{
errors: [QcsClientError], // <-- calls `std::stringify!(QcsClientError)` so would need to be changed}
The text was updated successfully, but these errors were encountered:
Since capitalization style between initialisms differs between python (prefer
QCSError
), and rust (preferQcsError
) it would be nice to have a similar pattern topy_wrap_type
to make an alias:The text was updated successfully, but these errors were encountered: