revert files under tensorflow/tools/docs

This commit is contained in:
Kazuaki Ishizaki 2020-01-19 14:15:28 +09:00
parent 27643b326c
commit c572fbdeda
5 changed files with 7 additions and 7 deletions

View File

@ -135,7 +135,7 @@ def do_not_doc_inheritable(obj):
# 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
on any class in the `__mro__`.
@ -178,7 +178,7 @@ def for_subclass_implementers(obj):
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
on any **parent** class in the `__mro__`.

View File

@ -166,7 +166,7 @@ class DocGeneratorVisitor(object):
This function is meant to be used as the `key` to the `sorted` function.
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 submodules to the root namespace.
Prefers short names `tf.thing` over `tf.a.b.c.thing`

View File

@ -46,7 +46,7 @@ def is_free_function(py_object, full_name, index):
index: The {full_name:py_object} dictionary for the public API.
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.
"""
if not tf_inspect.isfunction(py_object):
@ -235,7 +235,7 @@ class ReferenceResolver(object):
return cls(doc_index=doc_index, **json_dict)
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:
filepath: The file path to write the json to.

View File

@ -32,7 +32,7 @@ from tensorflow.tools.docs import doc_controls
from tensorflow.tools.docs import parser
# 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
# has already been extracted.
test_module = parser

View File

@ -18,7 +18,7 @@
The adjacent `parser` module creates `PageInfo` objects, containing all data
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:
md_page = build_md_page(page_info)