typeshed
typeshed copied to clipboard
[networkx] Cannot assign concrete types to `Graph[Hashable]`
Description
Several functions have arguments annotated as Graph[Hashable] or similar (ex. nx.number_of_selfloops).
As Graph is invariant, we encounter false-positive type errors when trying to assign concrete types (say Graph[int]).
I just encountered this as well