Skip to content

[networkx] Cannot assign concrete types to Graph[Hashable]  #12186

Open
@EarlMilktea

Description

@EarlMilktea

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]).

Activity

benjamin-kirkbride

benjamin-kirkbride commented on Jul 1, 2024

@benjamin-kirkbride
Contributor

I just encountered this as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @srittau@benjamin-kirkbride@EarlMilktea

      Issue actions

        [networkx] Cannot assign concrete types to `Graph[Hashable]` · Issue #12186 · python/typeshed