Skip to content

Comments

Type Graph/MultiGraph inherited methods with Self#15453

Open
albinoyoda wants to merge 1 commit intopython:mainfrom
albinoyoda:networkx-graphs-type-base-methods-with-self
Open

Type Graph/MultiGraph inherited methods with Self#15453
albinoyoda wants to merge 1 commit intopython:mainfrom
albinoyoda:networkx-graphs-type-base-methods-with-self

Conversation

@albinoyoda
Copy link

@albinoyoda albinoyoda commented Feb 22, 2026

Graph.subgraph() returntype is Graph, causing type-issues for inherited classes (DiGraph).

I also propose a fix for a similar method of MultiGraph (the copy method).

@github-actions
Copy link
Contributor

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

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