Skip to content

Commit 5b67a47

Browse files
authored
copy Graph should return Self (#1441)
1 parent f521a50 commit 5b67a47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rustworkx/rustworkx.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ class PyGraph(Generic[_S, _T]):
12401240
/,
12411241
weight_combo_fn: Callable[[_T, _T], _T] | None = ...,
12421242
) -> int: ...
1243-
def copy(self) -> PyGraph[_S, _T]: ...
1243+
def copy(self) -> Self: ...
12441244
def degree(self, node: int, /) -> int: ...
12451245
def edge_index_map(self) -> EdgeIndexMap[_T]: ...
12461246
def edge_indices(self) -> EdgeIndices: ...
@@ -1398,7 +1398,7 @@ class PyDiGraph(Generic[_S, _T]):
13981398
check_cycle: bool | None = ...,
13991399
weight_combo_fn: Callable[[_T, _T], _T] | None = ...,
14001400
) -> int: ...
1401-
def copy(self) -> PyDiGraph[_S, _T]: ...
1401+
def copy(self) -> Self: ...
14021402
def edge_index_map(self) -> EdgeIndexMap[_T]: ...
14031403
def edge_indices(self) -> EdgeIndices: ...
14041404
def edge_indices_from_endpoints(self, node_a: int, node_b: int) -> EdgeIndices: ...

0 commit comments

Comments
 (0)