Skip to content

Commit 6fb03a6

Browse files
Use more specific import tensorflow_docs.api_generator
PiperOrigin-RevId: 504677663
1 parent badea29 commit 6fb03a6

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

tools/templates/build_docs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from absl import app
2626
from absl import flags
2727

28-
import tensorflow_docs
28+
import tensorflow_docs.api_generator
2929
from tensorflow_docs.api_generator import generate_lib
3030
from tensorflow_docs.api_generator import public_api
3131

@@ -67,10 +67,10 @@ def gen_api_docs():
6767

6868
doc_generator = generate_lib.DocGenerator(
6969
root_title=PROJECT_FULL_NAME,
70-
# Replace `tensorflow_docs` with your module, here.
71-
py_modules=[(PROJECT_SHORT_NAME, tensorflow_docs)],
72-
# Replace `tensorflow_docs` with your module, here.
73-
base_dir=os.path.dirname(tensorflow_docs.__file__),
70+
# Replace `tensorflow_docs.api_generator` with your module, here.
71+
py_modules=[(PROJECT_SHORT_NAME, tensorflow_docs.api_generator)],
72+
# Replace `tensorflow_docs.api_generator` with your module, here.
73+
base_dir=os.path.dirname(tensorflow_docs.api_generator.__file__),
7474
code_url_prefix=_URL_PREFIX.value,
7575
search_hints=_SEARCH_HINTS.value,
7676
site_path=_SITE_PATH.value,

tools/tensorflow_docs/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,3 @@
1313
# limitations under the License.
1414
# ==============================================================================
1515
"""tensorflow_docs is a package for generating python api-reference docs."""
16-
17-
from __future__ import absolute_import
18-
from __future__ import division
19-
from __future__ import print_function
20-
21-
from tensorflow_docs import api_generator

0 commit comments

Comments
 (0)