Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
EarlMilktea opened this issue Jun 23, 2024 · 1 comment
Open

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

EarlMilktea opened this issue Jun 23, 2024 · 1 comment
Labels
stubs: false positive Type checkers report false errors

Comments

@EarlMilktea
Copy link

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

@benjamin-kirkbride
Copy link
Contributor

I just encountered this as well

@srittau srittau added the stubs: false positive Type checkers report false errors label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stubs: false positive Type checkers report false errors
Projects
None yet
Development

No branches or pull requests

3 participants