docstring, compatibility = _handle_compatibility(raw_docstring)
docstring, function_details = _parse_function_details(docstring)
+ if 'Generated by: tensorflow/tools/api/generator' in docstring:
+ docstring = ''
+
return _DocstringInfo(
docstring.split('\n')[0], docstring, function_details, compatibility)
return True
def __str__(self):
- return 'Defined in `%s%s`.\n\n' % (self.path_prefix, self.path)
+ return 'Defined in generated file: `%s%s`.\n\n' % (self.path_prefix,
+ self.path)
def _get_defined_in(py_object, parser_config):
if re.match(r'.*/gen_[^/]*\.py$', path):
return _GeneratedFile(path, parser_config)
+ if 'genfiles' in path or 'tools/api/generator' in path:
+ return _GeneratedFile(path, parser_config)
elif re.match(r'.*_pb2\.py$', path):
# The _pb2.py files all appear right next to their defining .proto file.
return _ProtoFile(path[:-7] + '.proto', parser_config)