| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…shable] Graph is invariant in its node type, so Graph[Hashable] rejected Graph[str] and similar graphs. Use the _Node type variable, like the other functions in the module.
|
Diff from mypy_primer, showing the effect of this PR on open source code: scipy-stubs (https://github.com/scipy/scipy-stubs)
+ tests/misc/test_submodules_empty.pyi:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #16543.
Graph is invariant in its node type, so the functions in networkx/classes/function.pyi that took Graph[Hashable] (set_node_attributes(..., name=...), set_edge_attributes(..., name=None), is_directed, is_empty, number_of_selfloops) rejected a Graph[str]; they now use _Node like the rest of the module.
Upstream: networkx/classes/function.py
Agent: Claude Code