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

Class _ClassPageInfo

tensorflow/tools/docs/parser.py:942–1302  ·  view source on GitHub ↗

Collects docs for a class page. Attributes: full_name: The fully qualified name of the object at the master location. Aka `master_name`. For example: `tf.nn.sigmoid`. short_name: The last component of the `full_name`. For example: `sigmoid`. defined_in: The path to the file wher

Source from the content-addressed store, hash-verified

940
941
942class _ClassPageInfo(object):
943 """Collects docs for a class page.
944
945 Attributes:
946 full_name: The fully qualified name of the object at the master
947 location. Aka `master_name`. For example: `tf.nn.sigmoid`.
948 short_name: The last component of the `full_name`. For example: `sigmoid`.
949 defined_in: The path to the file where this object is defined.
950 aliases: The list of all fully qualified names for the locations where the
951 object is visible in the public api. This includes the master location.
952 doc: A `_DocstringInfo` object representing the object's docstring (can be
953 created with `_parse_md_docstring`).
954 guides: A markdown string, of back links pointing to the api_guides that
955 reference this object.
956 bases: A list of `_LinkInfo` objects pointing to the docs for the parent
957 classes.
958 properties: A list of `_PropertyInfo` objects documenting the class'
959 properties (attributes that use `@property`).
960 methods: A list of `_MethodInfo` objects documenting the class' methods.
961 classes: A list of `_LinkInfo` objects pointing to docs for any nested
962 classes.
963 other_members: A list of `_OtherMemberInfo` objects documenting any other
964 object's defined inside the class object (mostly enum style fields).
965 """
966
967 def __init__(self, full_name):
968 self._full_name = full_name
969 self._defined_in = None
970 self._aliases = None
971 self._doc = None
972 self._guides = None
973 self._namedtuplefields = None
974
975 self._bases = None
976 self._properties = []
977 self._methods = []
978 self._classes = []
979 self._other_members = []
980
981 def for_function(self):
982 """Returns true if this object documents a function."""
983 return False
984
985 def for_class(self):
986 """Returns true if this object documents a class."""
987 return True
988
989 def for_module(self):
990 """Returns true if this object documents a module."""
991 return False
992
993 @property
994 def full_name(self):
995 """Returns the documented object's fully qualified name."""
996 return self._full_name
997
998 @property
999 def short_name(self):

Callers 1

docs_for_objectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected