MCPcopy Create free account
hub / github.com/pytorch/pytorch / makeDesc

Method makeDesc

caffe2/python/docs/generator.py:149–166  ·  view source on GitHub ↗
(title, args)

Source from the content-addressed store, hash-verified

147
148 def generateInterface(self, formatter):
149 def makeDesc(title, args):
150 f = formatter.clone()
151 f.addEmphasis(title, 1)
152 out = [(f.dump(), '')]
153 for arg in args:
154 f = formatter.clone()
155 if isinstance(arg, tuple):
156 name = arg[0]
157 if len(arg) > 1:
158 description = arg[1] or ''
159 else:
160 description = ''
161 else:
162 name = arg.name
163 description = arg.description or ''
164 f.addCode(name, inline=True)
165 out.append((f.dump(), description or ''))
166 return out
167
168 tuples = []
169

Callers

nothing calls this directly

Calls 6

isinstanceFunction · 0.85
cloneMethod · 0.45
addEmphasisMethod · 0.45
dumpMethod · 0.45
addCodeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected