-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
networkx: ignore_missing_stub = false
#13968
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
base: main
Are you sure you want to change the base?
networkx: ignore_missing_stub = false
#13968
Conversation
This comment has been minimized.
This comment has been minimized.
# "..._DT is not present at runtime" but we don't set it in stubs, I don't understand this one | ||
networkx(\.algorithms)?(\.tree)?(\.mst)?\.SpanningTreeIterator\.Partition\._DT | ||
networkx(\.algorithms)?(\.tree)?(\.branchings)?\.ArborescenceIterator\.Partition\._DT | ||
|
||
# variable differs from runtime type abc.ABCMeta | ||
networkx.classes.reportviews.EdgeView.dataview | ||
networkx.classes.reportviews.InEdgeView.dataview | ||
networkx.classes.reportviews.OutEdgeView.dataview | ||
networkx.classes.reportviews.OutMultiEdgeView.dataview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two issues I don't understand. I'm not sure if it's something I should do differently, just ignore, and/or report to mypy/stubtest
This comment has been minimized.
This comment has been minimized.
# Stubtest crashes due to special unicode character | ||
networkx.readwrite.text.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened an issue at python/mypy#19071
This comment has been minimized.
This comment has been minimized.
def items(self) -> ItemsView[str, Incomplete]: ... | ||
def keys(self) -> KeysView[str]: ... | ||
def values(self) -> ValuesView[Incomplete]: ... | ||
# Our pyright test doesn't understand `requires_python` in METADATA.toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too happy about this hack. Let's at least add a "TODO" comment and link a typeshed issue to fix our pyright test.
Co-authored-by: Sebastian Rittau <[email protected]>
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Whilst merging stubs from https://github.com/microsoft/python-type-stubs/tree/main/stubs/networkx , I noticed a lot of missing functions. This is a follow-up to #13956
There's 3 categories of new stubtest allowlist entries: 1 to avoid a crash, and 2 idk why they happen.