From 5a0d4120d55d9d74fc28d712a24c33cd537445fe Mon Sep 17 00:00:00 2001 From: Axel Dahlberg Date: Wed, 4 Jun 2025 17:29:12 +0200 Subject: [PATCH] [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. --- stubs/networkx/networkx/algorithms/tree/coding.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/networkx/networkx/algorithms/tree/coding.pyi b/stubs/networkx/networkx/algorithms/tree/coding.pyi index afd2ee79e2a1..619dc44d5142 100644 --- a/stubs/networkx/networkx/algorithms/tree/coding.pyi +++ b/stubs/networkx/networkx/algorithms/tree/coding.pyi @@ -12,7 +12,7 @@ class NotATree(NetworkXException): ... @_dispatchable def to_nested_tuple(T: Graph[_Node], root: _Node, canonical_form: bool = False): ... @_dispatchable -def from_nested_tuple(sequence: tuple[Incomplete], sensible_relabeling: bool = False): ... +def from_nested_tuple(sequence: tuple[Incomplete, ...], sensible_relabeling: bool = False): ... @_dispatchable def to_prufer_sequence(T: Graph[_Node]): ... @_dispatchable