aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/framework/docs.py
diff options
context:
space:
mode:
authorGravatar Martin Wicke <wicke@google.com>2016-01-25 14:42:53 -0800
committerGravatar Vijay Vasudevan <vrv@google.com>2016-01-25 15:16:57 -0800
commit914c870c6f6894d9be4c44d39878b1b7eeaf71bd (patch)
treecf14dbda8e7b4b75edcfc8ecec53be37a673e070 /tensorflow/python/framework/docs.py
parent22ac2b00fcb51e36ceaadf75e0b1f488e28ac9fc (diff)
Open-source doc generator. Adds tools/docs with shell scripts to generate docs from source code, both c++ and python. The generated docs overwrite the docs in the g3doc/api_docs folder.
Change: 112989505
Diffstat (limited to 'tensorflow/python/framework/docs.py')
-rw-r--r--tensorflow/python/framework/docs.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tensorflow/python/framework/docs.py b/tensorflow/python/framework/docs.py
index 9f953605e5..8b4ef789cd 100644
--- a/tensorflow/python/framework/docs.py
+++ b/tensorflow/python/framework/docs.py
@@ -15,8 +15,7 @@
"""Updates generated docs from Python doc comments.
-Both updates the files in the file-system and executes g4 commands to
-make sure any changes are ready to be submitted.
+Updates the documentation files.
"""
from __future__ import absolute_import
from __future__ import division
@@ -264,7 +263,10 @@ class Library(Document):
if argspec.defaults:
for arg, default in zip(
argspec.args[first_arg_with_default:], argspec.defaults):
- args_list.append("%s=%r" % (arg, default))
+ if callable(default):
+ args_list.append("%s=%s" % (arg, default.__name__))
+ else:
+ args_list.append("%s=%r" % (arg, default))
if argspec.varargs:
args_list.append("*" + argspec.varargs)
if argspec.keywords:
@@ -405,7 +407,7 @@ class Library(Document):
print(l, file=f)
def _write_class_markdown_to_file(self, f, name, cls):
- """Write the class doc to 'f'.
+ """Write the class doc to `f`.
Args:
f: File to write to.