Skip to content

Commit b61f4d7

Browse files
martinwicketensorflower-gardener
authored andcommitted
Doc generator fixes:
- enable contrib - show __init__ - remove core.protobuf module - fix bug in _get_arg_spec - hide contrib.learn.head Change: 146265365
1 parent 94016cd commit b61f4d7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

generate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ def extract():
118118

119119
# Access something in contrib so tf.contrib is properly loaded (it's hidden
120120
# behind lazy loading)
121-
# TODO(wicke): Enable contrib traversal once contrib is sealed.
122-
# _ = tf.contrib.__name__
121+
_ = tf.contrib.__name__
123122

124123
# Exclude some libaries in contrib from the documentation altogether.
125124
# TODO(wicke): Shrink this list.
@@ -163,6 +162,7 @@ def extract():
163162
],
164163
'contrib.learn': [
165164
'datasets',
165+
'head',
166166
'graph_actions',
167167
'io',
168168
'models',

parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ def _get_arg_spec(func):
264264
argspec_defaults = list(argspec.defaults[partial_args-first_default_arg:])
265265

266266
first_default_arg = max(0, first_default_arg - partial_args)
267-
for kwarg in func.keywords:
268-
if kwarg in argspec.args:
267+
for kwarg in (func.keywords or []):
268+
if kwarg in (argspec.args or []):
269269
i = argspec_args.index(kwarg)
270270
argspec_args.pop(i)
271271
if i >= first_default_arg:

0 commit comments

Comments
 (0)