mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Fix networkx DiDegreeView.__call__() can return int (#12472)
Fix networkx `DiDegreeView.__call__()` `DiDegreeView.__call__()` can return an integer if a single node is specified, as is also documented in the docstrings of the method:89718e0514/networkx/classes/digraph.py (L1198-L1199)Implementation:89718e0514/networkx/classes/reportviews.py (L436-L437)
This commit is contained in:
committed by
GitHub
parent
b3774bc22b
commit
7a2807af4e
@@ -33,7 +33,7 @@ class NodeDataView(AbstractSet[_Node]):
|
||||
|
||||
class DiDegreeView(Generic[_Node]):
|
||||
def __init__(self, G: Graph[_Node], nbunch: _NBunch[_Node] = None, weight: None | bool | str = None) -> None: ...
|
||||
def __call__(self, nbunch: _NBunch[_Node] = None, weight: None | bool | str = None) -> DiDegreeView[_Node]: ...
|
||||
def __call__(self, nbunch: _NBunch[_Node] = None, weight: None | bool | str = None) -> int | DiDegreeView[_Node]: ...
|
||||
def __getitem__(self, n: _Node) -> float: ...
|
||||
def __iter__(self) -> Iterator[tuple[_Node, float]]: ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user