提交 63bc43f7 编写于 作者: G Geoffrey Irving 提交者: TensorFlower Gardener

Add an option to docs.py collect_members to skip certain symbols

This is used only within Google.
Change: 119543426
上级 7b8c1973
......@@ -99,11 +99,12 @@ class Index(Document):
print("", file=f)
def collect_members(module_to_name):
def collect_members(module_to_name, exclude=()):
"""Collect all symbols from a list of modules.
Args:
module_to_name: Dictionary mapping modules to short names.
exclude: Set of fully qualified names to exclude.
Returns:
Dictionary mapping name to (fullname, member) pairs.
......@@ -116,6 +117,8 @@ def collect_members(module_to_name):
not _always_drop_symbol_re.match(name) and
(all_names is None or name in all_names)):
fullname = '%s.%s' % (module_name, name)
if fullname in exclude:
continue
if name in members:
other_fullname, other_member = members[name]
if member is not other_member:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册