Skip to content

Commit 5a0d412

Browse files
committed
[networkx] Correct argument type for from_nested_tuple
Currently the type hint specifies a tuple of length one with an arbitrary element. However the tuple passed may be of any length. It is actually an arbitrary nested tuple of tuples but not sure how to annotate that or if it's necessary.
1 parent 567b488 commit 5a0d412

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stubs/networkx/networkx/algorithms/tree/coding.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class NotATree(NetworkXException): ...
1212
@_dispatchable
1313
def to_nested_tuple(T: Graph[_Node], root: _Node, canonical_form: bool = False): ...
1414
@_dispatchable
15-
def from_nested_tuple(sequence: tuple[Incomplete], sensible_relabeling: bool = False): ...
15+
def from_nested_tuple(sequence: tuple[Incomplete, ...], sensible_relabeling: bool = False): ...
1616
@_dispatchable
1717
def to_prufer_sequence(T: Graph[_Node]): ...
1818
@_dispatchable

0 commit comments

Comments
 (0)