From 3423f885cf66aed80aef787f19710b4982963e21 Mon Sep 17 00:00:00 2001 From: HowXu Date: Wed, 25 Nov 2026 12:12:49 +0800 Subject: [PATCH] [networkx] Preserve the node type in isolates() --- stubs/networkx/networkx/algorithms/isolate.pyi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stubs/networkx/networkx/algorithms/isolate.pyi b/stubs/networkx/networkx/algorithms/isolate.pyi index 8c0c8bfe0315..6a9d7d3e648a 100644 --- a/stubs/networkx/networkx/algorithms/isolate.pyi +++ b/stubs/networkx/networkx/algorithms/isolate.pyi @@ -1,4 +1,3 @@ -from _typeshed import Incomplete from collections.abc import Iterator from networkx.classes.graph import Graph, _Node @@ -9,6 +8,6 @@ __all__ = ["is_isolate", "isolates", "number_of_isolates"] @_dispatchable def is_isolate(G: Graph[_Node], n: _Node) -> bool: ... @_dispatchable -def isolates(G: Graph[_Node]) -> Iterator[Incomplete]: ... +def isolates(G: Graph[_Node]) -> Iterator[_Node]: ... @_dispatchable def number_of_isolates(G: Graph[_Node]) -> int: ...