MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _ProtoFile

Class _ProtoFile

tensorflow/tools/docs/parser.py:1606–1629  ·  view source on GitHub ↗

This class indicates that the object is defined in a .proto file. This can be used for the `defined_in` slot of the `PageInfo` objects.

Source from the content-addressed store, hash-verified

1604
1605
1606class _ProtoFile(object):
1607 """This class indicates that the object is defined in a .proto file.
1608
1609 This can be used for the `defined_in` slot of the `PageInfo` objects.
1610 """
1611
1612 def __init__(self, path, parser_config):
1613 self.path = path
1614 self.path_prefix = parser_config.defined_in_prefix
1615 self.code_url_prefix = parser_config.code_url_prefix
1616
1617 def is_builtin(self):
1618 return False
1619
1620 def is_python_file(self):
1621 return False
1622
1623 def is_generated_file(self):
1624 return False
1625
1626 def __str__(self):
1627 return 'Defined in [`{prefix}{path}`]({code_prefix}{path}).\n\n'.format(
1628 path=self.path, prefix=self.path_prefix,
1629 code_prefix=self.code_url_prefix)
1630
1631
1632class _GeneratedFile(object):

Callers 1

_get_defined_inFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected