Skip to content

Commit

Permalink
[python] Add missing type
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed Jan 5, 2024
1 parent 2fd40b0 commit 615f14d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions binding/python/raftify.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class Peers:
""" """

def __init__(self, peers: dict) -> None: ...
def to_dict(self) -> dict[int, str]: ...
def items(self) -> list[tuple[int, str]]: ...
def get(self, node_id: int) -> str: ...
def add_peer(self, node_id: int, addr: str) -> None: ...
Expand Down
1 change: 1 addition & 0 deletions binding/python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fn raftify(py: Python, m: &PyModule) -> PyResult<()> {
m.add_class::<bindings::peers::PyPeers>()?;
m.add_class::<bindings::raft_client::PyRaftServiceClient>()?;
m.add_class::<bindings::raft_node::PyRaftNode>()?;
m.add_class::<bindings::cluster_join_ticket::PyClusterJoinTicket>()?;

m.add_class::<bindings::raft_rs::eraftpb::conf_change_single::PyConfChangeSingle>()?;
m.add_class::<bindings::raft_rs::eraftpb::conf_change_transition::PyConfChangeTransition>()?;
Expand Down

0 comments on commit 615f14d

Please sign in to comment.