summaryrefslogtreecommitdiff
path: root/networkx/readwrite
diff options
context:
space:
mode:
authorAndrea Tomassilli <44986518+atomassi@users.noreply.github.com>2021-01-09 21:39:05 +0000
committerGitHub <noreply@github.com>2021-01-09 13:39:05 -0800
commitf6db7247c69a25def6e0d01054e174eb074feadd (patch)
treee9ac1d173e0e6aaffbf9f73675834d55eb5f3d2f /networkx/readwrite
parent75e57baf39dcc3fb60c4231a60f22ae8ef5fdd05 (diff)
downloadnetworkx-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')
-rw-r--r--networkx/readwrite/gexf.py2
-rw-r--r--networkx/readwrite/json_graph/adjacency.py10
-rw-r--r--networkx/readwrite/json_graph/tree.py9
-rw-r--r--networkx/readwrite/multiline_adjlist.py7
-rw-r--r--networkx/readwrite/nx_shp.py2
-rw-r--r--networkx/readwrite/nx_yaml.py4
6 files changed, 22 insertions, 12 deletions
diff --git a/networkx/readwrite/gexf.py b/networkx/readwrite/gexf.py
index 4168a7d2..3560370b 100644
--- a/networkx/readwrite/gexf.py
+++ b/networkx/readwrite/gexf.py
@@ -50,6 +50,8 @@ def write_gexf(G, path, encoding="utf-8", prettyprint=True, version="1.2draft"):
Encoding for text data.
prettyprint : bool (optional, default: True)
If True use line breaks and indenting in output XML.
+ version: string (optional, default: '1.2draft')
+ The version of GEXF to be used for nodes attributes checking
Examples
--------
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
diff --git a/networkx/readwrite/multiline_adjlist.py b/networkx/readwrite/multiline_adjlist.py
index 0dd19fed..17d72f4a 100644
--- a/networkx/readwrite/multiline_adjlist.py
+++ b/networkx/readwrite/multiline_adjlist.py
@@ -141,6 +141,10 @@ def write_multiline_adjlist(G, path, delimiter=" ", comments="#", encoding="utf-
----------
G : NetworkX graph
+ path : string or file
+ Filename or file handle to write to.
+ Filenames ending in .gz or .bz2 will be compressed.
+
comments : string, optional
Marker for comment lines
@@ -203,6 +207,9 @@ def parse_multiline_adjlist(
nodetype : Python type, optional
Convert nodes to this type.
+ edgetype : Python type, optional
+ Convert edges to this type.
+
comments : string, optional
Marker for comment lines
diff --git a/networkx/readwrite/nx_shp.py b/networkx/readwrite/nx_shp.py
index 0c1a6507..1bfc031d 100644
--- a/networkx/readwrite/nx_shp.py
+++ b/networkx/readwrite/nx_shp.py
@@ -205,6 +205,8 @@ def write_shp(G, outdir):
Parameters
----------
+ G : NetworkX graph
+ Directed graph
outdir : directory path
Output directory for the two shapefiles.
diff --git a/networkx/readwrite/nx_yaml.py b/networkx/readwrite/nx_yaml.py
index 294922ea..80bd5dfd 100644
--- a/networkx/readwrite/nx_yaml.py
+++ b/networkx/readwrite/nx_yaml.py
@@ -29,9 +29,9 @@ def write_yaml(G_to_be_yaml, path_for_yaml_output, **kwds):
Parameters
----------
- G : graph
+ G_to_be_yaml : graph
A NetworkX graph
- path : file or string
+ path_for_yaml_output : file or string
File or filename to write.
Filenames ending in .gz or .bz2 will be compressed.