Skip to content

Commit

Permalink
Review names and module on pyclass signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro committed Jan 23, 2025
1 parent 102ec0f commit 8613127
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub(crate) struct EventLoopRunState {
tick_last: u128,
}

#[pyclass(frozen, subclass)]
#[pyclass(frozen, subclass, module = "rloop._rloop")]
pub struct EventLoop {
idle: atomic::AtomicBool,
io: Arc<Mutex<Poll>>,
Expand Down
4 changes: 2 additions & 2 deletions src/handles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl Handle for CBHandleOneArg {
}
}

#[pyclass(frozen, name = "CBHandle")]
#[pyclass(frozen, name = "CBHandle", module = "rloop._rloop")]
pub(crate) struct PyHandle {
pub handle: HandleRef,
}
Expand All @@ -151,7 +151,7 @@ impl PyHandle {
}
}

#[pyclass(frozen, name = "TimerHandle")]
#[pyclass(frozen, name = "TimerHandle", module = "rloop._rloop")]
pub(crate) struct PyTimerHandle {
pub handle: HandleRef,
#[pyo3(get)]
Expand Down
2 changes: 1 addition & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ enum ServerType {
// Unix,
}

#[pyclass(frozen, subclass)]
#[pyclass(frozen, subclass, module = "granian._granian")]
pub(crate) struct Server {
#[pyo3(get)]
_loop: Py<EventLoop>,
Expand Down
2 changes: 1 addition & 1 deletion src/sock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::os::raw::c_int;

use crate::py::sock;

#[pyclass(frozen)]
#[pyclass(frozen, module = "granian._granian")]
pub(crate) struct SocketWrapper {
sock: PyObject,
}
Expand Down
2 changes: 1 addition & 1 deletion src/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ impl TCPStream {
}
}

#[pyclass(frozen)]
#[pyclass(frozen, name = "TCPTransport", module = "granian._granian")]
pub(crate) struct PyTCPTransport {
pub fd: usize,
extra: HashMap<String, PyObject>,
Expand Down

0 comments on commit 8613127

Please sign in to comment.