Skip to content

Commit 126b06f

Browse files
authored
Correct type hints for networkx/algorithms/flow/mincost.pyi (#14395)
1 parent df3b5f3 commit 126b06f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

stubs/networkx/networkx/algorithms/flow/mincost.pyi

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ from networkx.utils.backends import _dispatchable
66
__all__ = ["min_cost_flow_cost", "min_cost_flow", "cost_of_flow", "max_flow_min_cost"]
77

88
@_dispatchable
9-
def min_cost_flow_cost(G: Graph[_Node], demand: str = "demand", capacity: str = "capacity", weight: str = "weight"): ...
9+
def min_cost_flow_cost(
10+
G: Graph[_Node], demand: str = "demand", capacity: str = "capacity", weight: str = "weight"
11+
) -> int | float: ...
1012
@_dispatchable
1113
def min_cost_flow(
1214
G: Graph[_Node], demand: str = "demand", capacity: str = "capacity", weight: str = "weight"
13-
) -> tuple[int | Incomplete, dict[Incomplete, dict[Incomplete, Incomplete]]]: ...
15+
) -> dict[Incomplete, dict[Incomplete, Incomplete]]: ...
1416
@_dispatchable
15-
def cost_of_flow(G: Graph[_Node], flowDict: SupportsGetItem[Incomplete, Incomplete], weight: str = "weight"): ...
17+
def cost_of_flow(G: Graph[_Node], flowDict: SupportsGetItem[Incomplete, Incomplete], weight: str = "weight") -> int | float: ...
1618
@_dispatchable
1719
def max_flow_min_cost(
1820
G: Graph[_Node], s: str, t: str, capacity: str = "capacity", weight: str = "weight"
19-
) -> tuple[int | Incomplete, dict[Incomplete, dict[Incomplete, Incomplete]]]: ...
21+
) -> dict[Incomplete, dict[Incomplete, Incomplete]]: ...

0 commit comments

Comments
 (0)