From e2e14d1cc10f464258654bef6cc4de1433e67a97 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Wed, 24 Apr 2024 17:00:56 +0200 Subject: [PATCH] [networkx] Fix incremental_closeness_centrality argument type (#11828) --- stubs/networkx/networkx/algorithms/centrality/closeness.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stubs/networkx/networkx/algorithms/centrality/closeness.pyi b/stubs/networkx/networkx/algorithms/centrality/closeness.pyi index 4a93551b6..e682d7ce8 100644 --- a/stubs/networkx/networkx/algorithms/centrality/closeness.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/closeness.pyi @@ -1,4 +1,4 @@ -from _typeshed import SupportsGetItem +from _typeshed import SupportsKeysAndGetItem from networkx.classes.graph import Graph, _Edge, _Node from networkx.utils.backends import _dispatch @@ -11,7 +11,7 @@ def closeness_centrality( def incremental_closeness_centrality( G: Graph[_Node], edge: _Edge[_Node], - prev_cc: SupportsGetItem[_Node, float] | None = None, + prev_cc: SupportsKeysAndGetItem[_Node, float] | None = None, insertion: bool = True, wf_improved: bool = True, ) -> dict[_Node, float]: ...