FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[networkx] Return the input graph type from compose_all by dannyshafer · Pull Request #16555 · python/typeshed · GitHub

Repository navigation

[networkx] Return the input graph type from compose_all - #16555

Merged
JelleZijlstra merged 1 commit into
python:mainfrom
dannyshafer:networkx-compose-all-type
Oct 20, 2026
Merged

JelleZijlstra merged 1 commit into
python:mainfrom
dannyshafer:networkx-compose-all-type

Conversation

dannyshafer commented Oct 17, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor

Closes #16546

compose_all builds its result with G.__class__() from the first graph, so it returns the same graph type as its input (upstream).

Written with Claude Code (an AI coding agent).

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

scipy-stubs (https://github.com/scipy/scipy-stubs)
+ tests/misc/test_submodules_empty.pyi:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

JelleZijlstra merged commit ad36363 into python:main Oct 20, 2026
74 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.compose_all should return the type of its first argument

3 participants


Back | FazBrowse Home | New Git URL