You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
networkx: DiDegreeView doesn't have overload for single node as argument to __call__ #14616
Since the recent release of types-networkx3.5.0.20250821, Pyright is giving errors when trying to call DiGraph.in_degrees and DiGraph.out_degrees for a single node. This is a valid way to access the data as described in the networkx docstings below:
temp.py
temp.py:10:8 - error: No overloads for "__call__" match the provided arguments (reportCallIssue)
temp.py:10:20 - error: Argument of type "Literal[3]" cannot be assigned to parameter "nbunch" of type "Iterable[Unknown] | None" in function "__call__"
Type "Literal[3]" is not assignable to type "Iterable[Unknown] | None"
"Literal[3]" is not assignable to "None"
"Literal[3]" is incompatible with protocol "Iterable[Unknown]"
"__iter__" is not present (reportArgumentType)
temp.py:10:24 - error: No overloads for "__call__" match the provided arguments (reportCallIssue)
temp.py:10:37 - error: Argument of type "Literal[3]" cannot be assigned to parameter "nbunch" of type "Iterable[Unknown] | None" in function "__call__"
Type "Literal[3]" is not assignable to type "Iterable[Unknown] | None"
"Literal[3]" is not assignable to "None"
"Literal[3]" is incompatible with protocol "Iterable[Unknown]"
"__iter__" is not present (reportArgumentType)
4 errors, 0 warnings, 0 informations
Activity
brianschubert commentedon Aug 21, 2025
Thanks for the report!
I think this may already be addressed in #14597, cc @Avasam
melisande-c commentedon Aug 21, 2025
Oh so it is! Sorry I didn't see that