Commit 60c91f3
authored
Enhance annotation for Graph.add_weighted_edges_from
Enhance annotation for `Graph.add_weighted_edges_from`
The current
[`3.6.1.20260303`](https://github.com/python/typeshed/blob/50ec9108eb191ab96d9ab766e506a7c680d5f3d6/stubs/networkx/networkx/classes/graph.pyi#L74) textual
description states:
> ebunch_to_add: container of edges
>Each edge given in the list or container will be added to the
> graph.
> The edges must be given as 3-tuples (u, v, w) where w is a
> number.
However
1. `w` can be a `Decimal` (which is still a number) or
2. even `None` (which is not a number), but the used
`add_edges_from` and `add_edges` methods process it fine.
Change the annotation to reflect these.1 parent 50ec910 commit 60c91f3
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | | - | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
0 commit comments