Skip to content

[networkx] Return the input graph type from transitive_closure - #16556

Open
dannyshafer wants to merge 1 commit into
python:mainfrom
dannyshafer:networkx-transitive-closure-type
Open

dannyshafer wants to merge 1 commit into
python:mainfrom
dannyshafer:networkx-transitive-closure-type

Conversation

@dannyshafer

@dannyshafer dannyshafer commented Oct 17, 2026 •

Copy link
Copy Markdown

Closes #16547

transitive_closure starts from G.copy(), so it returns the same graph type as its input (upstream).

Written with Claude Code (an AI coding agent).

@github-actions

Copy link
Copy Markdown
Contributor

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

This branch has not been deployed

No deployments
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.

nx.transitive_closure should return the same Graph type as it took in!

2 participants