提交 c4c1a239 编写于 作者: M Mark Daoust 提交者: TensorFlower Gardener

Make submodules the preferred names, except for modules, they should prefer the root.

Prefer `tf.submodule.Symbol` to `tf.Symbol`.
When the object is a module, then prefer
`tf.submodule` over `tf.package.submodule` so that `tf.submodule.Symbol` finds `tf.submodule`.

PiperOrigin-RevId: 235278774
上级 9e8c24df
...@@ -194,10 +194,11 @@ class DocGeneratorVisitor(object): ...@@ -194,10 +194,11 @@ class DocGeneratorVisitor(object):
contrib_score = 1 contrib_score = 1
while parts: while parts:
parts.pop()
container = self._index['.'.join(parts)] container = self._index['.'.join(parts)]
if tf_inspect.ismodule(container): if tf_inspect.ismodule(container):
break break
parts.pop()
module_length = len(parts) module_length = len(parts)
if len(parts) == 2: if len(parts) == 2:
# `tf.submodule.thing` is better than `tf.thing` # `tf.submodule.thing` is better than `tf.thing`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册