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

Class _FunctionDetail

tensorflow/tools/docs/parser.py:511–529  ·  view source on GitHub ↗

A simple class to contain function details. Composed of a "keyword", a possibly empty "header" string, and a possibly empty list of key-value pair "items".

Source from the content-addressed store, hash-verified

509
510
511class _FunctionDetail(
512 collections.namedtuple('_FunctionDetail', ['keyword', 'header', 'items'])):
513 """A simple class to contain function details.
514
515 Composed of a "keyword", a possibly empty "header" string, and a possibly
516 empty
517 list of key-value pair "items".
518 """
519 __slots__ = []
520
521 def __str__(self):
522 """Return the original string that represents the function detail."""
523 parts = [self.keyword + ':\n']
524 parts.append(self.header)
525 for key, value in self.items:
526 parts.append(' ' + key + ': ')
527 parts.append(value)
528
529 return ''.join(parts)
530
531
532def _parse_function_details(docstring):

Callers 1

_parse_function_detailsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected