revert files under tensorflow/tools/docs
This commit is contained in:
parent
27643b326c
commit
c572fbdeda
@ -135,7 +135,7 @@ def do_not_doc_inheritable(obj):
|
|||||||
# method2
|
# method2
|
||||||
```
|
```
|
||||||
|
|
||||||
When generating docs for a class's attributes, the `__mro__` is searched and
|
When generating docs for a class's arributes, the `__mro__` is searched and
|
||||||
the attribute will be skipped if this decorator is detected on the attribute
|
the attribute will be skipped if this decorator is detected on the attribute
|
||||||
on any class in the `__mro__`.
|
on any class in the `__mro__`.
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ def for_subclass_implementers(obj):
|
|||||||
|
|
||||||
Works on method, or other class-attributes.
|
Works on method, or other class-attributes.
|
||||||
|
|
||||||
When generating docs for a class's attributes, the `__mro__` is searched and
|
When generating docs for a class's arributes, the `__mro__` is searched and
|
||||||
the attribute will be skipped if this decorator is detected on the attribute
|
the attribute will be skipped if this decorator is detected on the attribute
|
||||||
on any **parent** class in the `__mro__`.
|
on any **parent** class in the `__mro__`.
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ class DocGeneratorVisitor(object):
|
|||||||
This function is meant to be used as the `key` to the `sorted` function.
|
This function is meant to be used as the `key` to the `sorted` function.
|
||||||
|
|
||||||
This sorting in order:
|
This sorting in order:
|
||||||
Prefers names referring to the defining class, over a subclass.
|
Prefers names refering to the defining class, over a subclass.
|
||||||
Prefers names that are not in "contrib".
|
Prefers names that are not in "contrib".
|
||||||
prefers submodules to the root namespace.
|
prefers submodules to the root namespace.
|
||||||
Prefers short names `tf.thing` over `tf.a.b.c.thing`
|
Prefers short names `tf.thing` over `tf.a.b.c.thing`
|
||||||
|
@ -46,7 +46,7 @@ def is_free_function(py_object, full_name, index):
|
|||||||
index: The {full_name:py_object} dictionary for the public API.
|
index: The {full_name:py_object} dictionary for the public API.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
True if the object is a stand-alone function, and not part of a class
|
True if the obeject is a stand-alone function, and not part of a class
|
||||||
definition.
|
definition.
|
||||||
"""
|
"""
|
||||||
if not tf_inspect.isfunction(py_object):
|
if not tf_inspect.isfunction(py_object):
|
||||||
@ -235,7 +235,7 @@ class ReferenceResolver(object):
|
|||||||
return cls(doc_index=doc_index, **json_dict)
|
return cls(doc_index=doc_index, **json_dict)
|
||||||
|
|
||||||
def to_json_file(self, filepath):
|
def to_json_file(self, filepath):
|
||||||
"""Converts the ReferenceResolver to json and writes it to the specified file.
|
"""Converts the RefenceResolver to json and writes it to the specified file.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
filepath: The file path to write the json to.
|
filepath: The file path to write the json to.
|
||||||
|
@ -32,7 +32,7 @@ from tensorflow.tools.docs import doc_controls
|
|||||||
from tensorflow.tools.docs import parser
|
from tensorflow.tools.docs import parser
|
||||||
|
|
||||||
# The test needs a real module. `types.ModuleType()` doesn't work, as the result
|
# The test needs a real module. `types.ModuleType()` doesn't work, as the result
|
||||||
# is a `builtin` module. Using "parser" here is arbitrary. The tests don't
|
# is a `builtin` module. Using "parser" here is arbitraty. The tests don't
|
||||||
# depend on the module contents. At this point in the process the public api
|
# depend on the module contents. At this point in the process the public api
|
||||||
# has already been extracted.
|
# has already been extracted.
|
||||||
test_module = parser
|
test_module = parser
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
The adjacent `parser` module creates `PageInfo` objects, containing all data
|
The adjacent `parser` module creates `PageInfo` objects, containing all data
|
||||||
necessary to document an element of the TensorFlow API.
|
necessary to document an element of the TensorFlow API.
|
||||||
|
|
||||||
This module contains one public function, which handles the conversion of these
|
This module contains one public function, which handels the conversion of these
|
||||||
`PageInfo` objects into a markdown string:
|
`PageInfo` objects into a markdown string:
|
||||||
|
|
||||||
md_page = build_md_page(page_info)
|
md_page = build_md_page(page_info)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user