typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

Fix networkx `DiDegreeView.__call__()` can return `int`

Open NiklasRosenstein opened this issue 1 year ago • 1 comments

DiDegreeView.__call__() can return an integer if a single node is specified, as is also documented in the docstrings of the method:

https://github.com/networkx/networkx/blob/89718e0514bded93ded5b00aed755a4474c1dc6f/networkx/classes/digraph.py#L1198-L1199

Implementation:

https://github.com/networkx/networkx/blob/89718e0514bded93ded5b00aed755a4474c1dc6f/networkx/classes/reportviews.py#L436-L437

NiklasRosenstein avatar Aug 02 '24 00:08 NiklasRosenstein

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

github-actions[bot] avatar Aug 02 '24 00:08 github-actions[bot]