MCPcopy Create free account
hub / github.com/aitjcize/cppman / __init__

Method __init__

cppman/formatter/tableparser.py:34–45  ·  view source on GitHub ↗
(self, parent, name, attr_list, body)

Source from the content-addressed store, hash-verified

32
33class Node(object):
34 def __init__(self, parent, name, attr_list, body):
35 self.parent = parent
36 self.name = name
37 self.body = body
38 self.attr = dict((x[0], x[2]) for x in ATTR.findall(attr_list))
39
40 if self.name in ['th', 'td']:
41 self.text = self.strip_tags(self.body)
42 self.children = []
43 else:
44 self.text = ''
45 self.children = [Node(self, *g) for g in NODE.findall(self.body)]
46
47 def __repr__(self):
48 return "<Node('%s')>" % self.name

Callers

nothing calls this directly

Calls 2

strip_tagsMethod · 0.95
NodeClass · 0.85

Tested by

no test coverage detected