diff options
| author | Andrea Tomassilli <44986518+atomassi@users.noreply.github.com> | 2021-01-09 21:39:05 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-09 13:39:05 -0800 |
| commit | f6db7247c69a25def6e0d01054e174eb074feadd (patch) | |
| tree | e9ac1d173e0e6aaffbf9f73675834d55eb5f3d2f /networkx/readwrite/json_graph | |
| parent | 75e57baf39dcc3fb60c4231a60f22ae8ef5fdd05 (diff) | |
| download | networkx-f6db7247c69a25def6e0d01054e174eb074feadd.tar.gz | |
Fix docstrings and remove unused variables (#4501)
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Diffstat (limited to 'networkx/readwrite/json_graph')
| -rw-r--r-- | networkx/readwrite/json_graph/adjacency.py | 10 | ||||
| -rw-r--r-- | networkx/readwrite/json_graph/tree.py | 9 |
2 files changed, 9 insertions, 10 deletions
diff --git a/networkx/readwrite/json_graph/adjacency.py b/networkx/readwrite/json_graph/adjacency.py index cf7c8c72..4b869e4f 100644 --- a/networkx/readwrite/json_graph/adjacency.py +++ b/networkx/readwrite/json_graph/adjacency.py @@ -90,11 +90,6 @@ def adjacency_graph(data, directed=False, multigraph=True, attrs=_attrs): data : dict Adjacency list formatted graph data - Returns - ------- - G : NetworkX graph - A NetworkX graph object - directed : bool If True, and direction not specified in data, return a directed graph. @@ -107,6 +102,11 @@ def adjacency_graph(data, directed=False, multigraph=True, attrs=_attrs): data. The values should be unique. Default value: :samp:`dict(id='id', key='key')`. + Returns + ------- + G : NetworkX graph + A NetworkX graph object + Examples -------- >>> from networkx.readwrite import json_graph diff --git a/networkx/readwrite/json_graph/tree.py b/networkx/readwrite/json_graph/tree.py index bb16f323..2863712d 100644 --- a/networkx/readwrite/json_graph/tree.py +++ b/networkx/readwrite/json_graph/tree.py @@ -96,17 +96,16 @@ def tree_graph(data, attrs=_attrs): ---------- data : dict Tree formatted graph data - - Returns - ------- - G : NetworkX DiGraph - attrs : dict A dictionary that contains two keys 'id' and 'children'. The corresponding values provide the attribute names for storing NetworkX-internal graph data. The values should be unique. Default value: :samp:`dict(id='id', children='children')`. + Returns + ------- + G : NetworkX DiGraph + Examples -------- >>> from networkx.readwrite import json_graph |
