Skip to content

Correct type hints for networkx/algorithms/flow/mincost.pyi #14395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions stubs/networkx/networkx/algorithms/flow/mincost.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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]]: ...