From 126b06fc322be1d44f98ee03b20f5c5ab245edb5 Mon Sep 17 00:00:00 2001 From: Nate England <69609716+engnatha@users.noreply.github.com> Date: Fri, 11 Jul 2025 05:33:33 -0400 Subject: [PATCH] Correct type hints for networkx/algorithms/flow/mincost.pyi (#14395) --- stubs/networkx/networkx/algorithms/flow/mincost.pyi | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/stubs/networkx/networkx/algorithms/flow/mincost.pyi b/stubs/networkx/networkx/algorithms/flow/mincost.pyi index ee2cfc8cc..7ca50162d 100644 --- a/stubs/networkx/networkx/algorithms/flow/mincost.pyi +++ b/stubs/networkx/networkx/algorithms/flow/mincost.pyi @@ -6,14 +6,16 @@ from networkx.utils.backends import _dispatchable __all__ = ["min_cost_flow_cost", "min_cost_flow", "cost_of_flow", "max_flow_min_cost"] @_dispatchable -def min_cost_flow_cost(G: Graph[_Node], demand: str = "demand", capacity: str = "capacity", weight: str = "weight"): ... +def min_cost_flow_cost( + G: Graph[_Node], demand: str = "demand", capacity: str = "capacity", weight: str = "weight" +) -> int | float: ... @_dispatchable def min_cost_flow( G: Graph[_Node], demand: str = "demand", capacity: str = "capacity", weight: str = "weight" -) -> tuple[int | Incomplete, dict[Incomplete, dict[Incomplete, Incomplete]]]: ... +) -> dict[Incomplete, dict[Incomplete, Incomplete]]: ... @_dispatchable -def cost_of_flow(G: Graph[_Node], flowDict: SupportsGetItem[Incomplete, Incomplete], weight: str = "weight"): ... +def cost_of_flow(G: Graph[_Node], flowDict: SupportsGetItem[Incomplete, Incomplete], weight: str = "weight") -> int | float: ... @_dispatchable def max_flow_min_cost( G: Graph[_Node], s: str, t: str, capacity: str = "capacity", weight: str = "weight" -) -> tuple[int | Incomplete, dict[Incomplete, dict[Incomplete, Incomplete]]]: ... +) -> dict[Incomplete, dict[Incomplete, Incomplete]]: ...