File tree Expand file tree Collapse file tree 5 files changed +988
-906
lines changed
tools/tensorflow_docs/api_generator Expand file tree Collapse file tree 5 files changed +988
-906
lines changed Original file line number Diff line number Diff line change 31
31
from tensorflow_docs .api_generator import parser
32
32
from tensorflow_docs .api_generator import pretty_docs
33
33
from tensorflow_docs .api_generator import public_api
34
+ from tensorflow_docs .api_generator import signature
34
35
from tensorflow_docs .api_generator import traverse
35
36
from tensorflow_docs .api_generator .report import utils
36
37
@@ -137,15 +138,12 @@ def deprecated(self):
137
138
if 'tf.contrib' in self .full_name :
138
139
return True
139
140
140
- try :
141
- # Instead of only checking the docstring, checking for the decorator
142
- # provides an additional level of certainty about the correctness of the
143
- # the application of `status: deprecated`.
144
- decorator_list = parser .extract_decorators (self .py_object )
145
- if any ('deprecat' in dec for dec in decorator_list ):
146
- return self ._check_docstring ()
147
- except AttributeError :
148
- pass
141
+ # Instead of only checking the docstring, checking for the decorator
142
+ # provides an additional level of certainty about the correctness of the
143
+ # the application of `status: deprecated`.
144
+ decorator_list = signature .extract_decorators (self .py_object )
145
+ if any ('deprecat' in dec for dec in decorator_list ):
146
+ return self ._check_docstring ()
149
147
150
148
return False
151
149
You can’t perform that action at this time.
0 commit comments