Skip to content

[networkx] Replace Incomplete in graph-returning algorithm stubs - #16729

Merged
srittau merged 1 commit into
python:mainfrom
hendo-21:networkx-replace-incomplete-graph-returns
Nov 7, 2026
Merged

srittau merged 1 commit into
python:mainfrom
hendo-21:networkx-replace-incomplete-graph-returns

Conversation

@hendo-21

@hendo-21 hendo-21 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

The networkx functions below build their return graphs from the input G's nodes, so their return types can be Graph[_Node] to match the input Graph[_Node], instead of Graph[Incomplete].

networkx 3.6.1 source:

Agent: Claude Code (claude-opus-5-5), used to find other functions that build their return graph from G similarly to minimum_spanning_tree, and to explain parts of the networkx source. I checked each against source.

@hendo-21 hendo-21 changed the title [networkx] replace incomplete in graph-returning algorithm stubs [networkx] Replace Incomplete in graph-returning algorithm stubs Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
srittau merged commit 0fb89ac into python:main Nov 7, 2026
74 checks passed
@hendo-21

hendo-21 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for reviewing and merging this, @srittau!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants