MCPcopy Index your code
hub / github.com/go-python/gopy / genInterface

Method genInterface

bind/gen_struct.go:301–316  ·  view source on GitHub ↗

Interface

(ifc *Interface)

Source from the content-addressed store, hash-verified

299// Interface
300
301func (g *pyGen) genInterface(ifc *Interface) {
302 strNm := ifc.obj.Name()
303 g.pywrap.Printf(`
304# Python type for interface %[3]s
305class %[1]s(go.GoClass):
306 ""%[2]q""
307`,
308 strNm,
309 ifc.Doc(),
310 ifc.GoName(),
311 )
312 g.pywrap.Indent()
313 g.genIfaceInit(ifc)
314 g.genIfaceMethods(ifc)
315 g.pywrap.Outdent()
316}
317
318func (g *pyGen) genIfaceInit(ifc *Interface) {
319 g.pywrap.Printf("def __init__(self, *args, **kwargs):\n")

Callers 1

genAllMethod · 0.95

Calls 8

genIfaceInitMethod · 0.95
genIfaceMethodsMethod · 0.95
PrintfMethod · 0.80
IndentMethod · 0.80
OutdentMethod · 0.80
DocMethod · 0.65
GoNameMethod · 0.65
NameMethod · 0.45

Tested by

no test coverage detected