diff options
author | Jarrod Millman <jarrod.millman@gmail.com> | 2020-08-19 13:56:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-19 13:56:18 -0700 |
commit | 99fc1bb6690ac1a45124db2a01c12fd64dcb109b (patch) | |
tree | 1891fc18beca7b6d1005b9ce32175ddfed29870f /networkx/algorithms/tree/mst.py | |
parent | 7b3ad34e1be1c61dbccae3df920afb898e2eb8ad (diff) | |
download | networkx-99fc1bb6690ac1a45124db2a01c12fd64dcb109b.tar.gz |
Format python in docstrings (#4168)
* Format code w/ black
* Format docstrings w/ black
* Manual cleanup
* Tell pytest to ignore planned deprecations
* Don't call plt.show during testing
* Another known deprecation
* DOC: rm duplicate line from docstring example
* Minor cleanup
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Diffstat (limited to 'networkx/algorithms/tree/mst.py')
-rw-r--r-- | networkx/algorithms/tree/mst.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/networkx/algorithms/tree/mst.py b/networkx/algorithms/tree/mst.py index f3f352a7..bad8c132 100644 --- a/networkx/algorithms/tree/mst.py +++ b/networkx/algorithms/tree/mst.py @@ -361,7 +361,7 @@ def minimum_spanning_edges( >>> G = nx.cycle_graph(4) >>> G.add_edge(0, 3, weight=2) - >>> mst = tree.minimum_spanning_edges(G, algorithm='kruskal', data=False) + >>> mst = tree.minimum_spanning_edges(G, algorithm="kruskal", data=False) >>> edgelist = list(mst) >>> sorted(sorted(e) for e in edgelist) [[0, 1], [1, 2], [2, 3]] @@ -370,7 +370,7 @@ def minimum_spanning_edges( >>> G = nx.cycle_graph(4) >>> G.add_edge(0, 3, weight=2) - >>> mst = tree.minimum_spanning_edges(G, algorithm='prim', data=False) + >>> mst = tree.minimum_spanning_edges(G, algorithm="prim", data=False) >>> edgelist = list(mst) >>> sorted(sorted(e) for e in edgelist) [[0, 1], [1, 2], [2, 3]] @@ -455,7 +455,7 @@ def maximum_spanning_edges( >>> G = nx.cycle_graph(4) >>> G.add_edge(0, 3, weight=2) - >>> mst = tree.maximum_spanning_edges(G, algorithm='kruskal', data=False) + >>> mst = tree.maximum_spanning_edges(G, algorithm="kruskal", data=False) >>> edgelist = list(mst) >>> sorted(sorted(e) for e in edgelist) [[0, 1], [0, 3], [1, 2]] @@ -463,8 +463,8 @@ def maximum_spanning_edges( Find maximum spanning edges by Prim's algorithm >>> G = nx.cycle_graph(4) - >>> G.add_edge(0, 3, weight=2) # assign weight 2 to edge 0-3 - >>> mst = tree.maximum_spanning_edges(G, algorithm='prim', data=False) + >>> G.add_edge(0, 3, weight=2) # assign weight 2 to edge 0-3 + >>> mst = tree.maximum_spanning_edges(G, algorithm="prim", data=False) >>> edgelist = list(mst) >>> sorted(sorted(e) for e in edgelist) [[0, 1], [0, 3], [2, 3]] |