summaryrefslogtreecommitdiff
path: root/networkx/readwrite/gexf.py
diff options
context:
space:
mode:
authorJarrod Millman <jarrod.millman@gmail.com>2020-08-19 13:56:18 -0700
committerGitHub <noreply@github.com>2020-08-19 13:56:18 -0700
commit99fc1bb6690ac1a45124db2a01c12fd64dcb109b (patch)
tree1891fc18beca7b6d1005b9ce32175ddfed29870f /networkx/readwrite/gexf.py
parent7b3ad34e1be1c61dbccae3df920afb898e2eb8ad (diff)
downloadnetworkx-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/readwrite/gexf.py')
-rw-r--r--networkx/readwrite/gexf.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/networkx/readwrite/gexf.py b/networkx/readwrite/gexf.py
index b69c4ae7..e3fe5a57 100644
--- a/networkx/readwrite/gexf.py
+++ b/networkx/readwrite/gexf.py
@@ -57,9 +57,9 @@ def write_gexf(G, path, encoding="utf-8", prettyprint=True, version="1.2draft"):
>>> nx.write_gexf(G, "test.gexf")
# visualization data
- >>> G.nodes[0]['viz'] = {'size': 54}
- >>> G.nodes[0]['viz']['position'] = {'x' : 0, 'y' : 1}
- >>> G.nodes[0]['viz']['color'] = {'r' : 0, 'g' : 0, 'b' : 256}
+ >>> G.nodes[0]["viz"] = {"size": 54}
+ >>> G.nodes[0]["viz"]["position"] = {"x": 0, "y": 1}
+ >>> G.nodes[0]["viz"]["color"] = {"r": 0, "g": 0, "b": 256}
Notes
@@ -103,10 +103,10 @@ def generate_gexf(G, encoding="utf-8", prettyprint=True, version="1.2draft"):
Examples
--------
>>> G = nx.path_graph(4)
- >>> linefeed = chr(10) # linefeed=\n
+ >>> linefeed = chr(10) # linefeed=\n
>>> s = linefeed.join(nx.generate_gexf(G)) # doctest: +SKIP
>>> for line in nx.generate_gexf(G): # doctest: +SKIP
- ... print(line)
+ ... print(line)
Notes
-----