From c572fbdeda18c1d36e137b6e91a5212d61176f6e Mon Sep 17 00:00:00 2001 From: Kazuaki Ishizaki Date: Sun, 19 Jan 2020 14:15:28 +0900 Subject: [PATCH] revert files under tensorflow/tools/docs --- tensorflow/tools/docs/doc_controls.py | 4 ++-- tensorflow/tools/docs/doc_generator_visitor.py | 2 +- tensorflow/tools/docs/parser.py | 4 ++-- tensorflow/tools/docs/parser_test.py | 2 +- tensorflow/tools/docs/pretty_docs.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tensorflow/tools/docs/doc_controls.py b/tensorflow/tools/docs/doc_controls.py index e66a1e52138..27a1d2075e9 100644 --- a/tensorflow/tools/docs/doc_controls.py +++ b/tensorflow/tools/docs/doc_controls.py @@ -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__`. diff --git a/tensorflow/tools/docs/doc_generator_visitor.py b/tensorflow/tools/docs/doc_generator_visitor.py index b409566d3f7..ec2102a5935 100644 --- a/tensorflow/tools/docs/doc_generator_visitor.py +++ b/tensorflow/tools/docs/doc_generator_visitor.py @@ -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` diff --git a/tensorflow/tools/docs/parser.py b/tensorflow/tools/docs/parser.py index 994d5d4be9b..61518bcbd46 100644 --- a/tensorflow/tools/docs/parser.py +++ b/tensorflow/tools/docs/parser.py @@ -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. diff --git a/tensorflow/tools/docs/parser_test.py b/tensorflow/tools/docs/parser_test.py index b5a06cab26c..15d4cad89cc 100644 --- a/tensorflow/tools/docs/parser_test.py +++ b/tensorflow/tools/docs/parser_test.py @@ -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 diff --git a/tensorflow/tools/docs/pretty_docs.py b/tensorflow/tools/docs/pretty_docs.py index 946c800def5..98b5c7a3b39 100644 --- a/tensorflow/tools/docs/pretty_docs.py +++ b/tensorflow/tools/docs/pretty_docs.py @@ -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)