mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 15:24:48 +01:00
fix(python): remove the macro_export and use pub(crate) instead so that it doesn't leak into the documentations.
This commit is contained in:
parent
6afa212fe4
commit
f116f27b39
3 changed files with 5 additions and 5 deletions
|
@ -6,8 +6,8 @@ use crate::cursor::Controller as CursorController;
|
|||
use pyo3::exceptions::PyValueError;
|
||||
use pyo3::prelude::*;
|
||||
|
||||
use super::a_sync_allow_threads;
|
||||
use super::Promise;
|
||||
use crate::a_sync_allow_threads;
|
||||
|
||||
// need to do manually since Controller is a trait implementation
|
||||
#[pymethods]
|
||||
|
|
|
@ -82,7 +82,6 @@ impl Promise {
|
|||
}
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! a_sync {
|
||||
($x:expr) => {{
|
||||
Ok($crate::ffi::python::Promise(Some(
|
||||
|
@ -91,8 +90,8 @@ macro_rules! a_sync {
|
|||
)))
|
||||
}};
|
||||
}
|
||||
pub(crate) use a_sync;
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! a_sync_allow_threads {
|
||||
($py:ident, $x:expr) => {{
|
||||
$py.allow_threads(move || {
|
||||
|
@ -103,6 +102,7 @@ macro_rules! a_sync_allow_threads {
|
|||
})
|
||||
}};
|
||||
}
|
||||
pub(crate) use a_sync_allow_threads;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
struct LoggerProducer(mpsc::UnboundedSender<String>);
|
||||
|
@ -197,7 +197,7 @@ fn set_logger(py: Python, logging_cb: PyObject, debug: bool) -> bool {
|
|||
|
||||
impl From<crate::errors::ConnectionError> for PyErr {
|
||||
fn from(value: crate::errors::ConnectionError) -> Self {
|
||||
PyConnectionError::new_err(format!("Connection error: {value}"))
|
||||
PyConnectionError::new_err(format!("Connection error: {value}"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ use crate::cursor::Controller as CursorController;
|
|||
use crate::workspace::Workspace;
|
||||
use pyo3::prelude::*;
|
||||
|
||||
use super::a_sync_allow_threads;
|
||||
use super::Promise;
|
||||
use crate::a_sync_allow_threads;
|
||||
|
||||
#[pymethods]
|
||||
impl Workspace {
|
||||
|
|
Loading…
Reference in a new issue