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

Class _GeneratedFile

tensorflow/tools/docs/parser.py:1632–1655  ·  view source on GitHub ↗

This class indicates that the object is defined in a generated python file. Generated files should not be linked to directly. This can be used for the `defined_in` slot of the `PageInfo` objects.

Source from the content-addressed store, hash-verified

1630
1631
1632class _GeneratedFile(object):
1633 """This class indicates that the object is defined in a generated python file.
1634
1635 Generated files should not be linked to directly.
1636
1637 This can be used for the `defined_in` slot of the `PageInfo` objects.
1638 """
1639
1640 def __init__(self, path, parser_config):
1641 self.path = path
1642 self.path_prefix = parser_config.defined_in_prefix
1643
1644 def is_builtin(self):
1645 return False
1646
1647 def is_python_file(self):
1648 return False
1649
1650 def is_generated_file(self):
1651 return True
1652
1653 def __str__(self):
1654 return 'Defined in generated file: `%s%s`.\n\n' % (self.path_prefix,
1655 self.path)
1656
1657
1658def _get_defined_in(py_object, parser_config):

Callers 1

_get_defined_inFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected