MCPcopy Create free account
hub / github.com/numpy/numpy / CommentQueue

Class CommentQueue

numpy/linalg/lapack_lite/clapack_scrub.py:132–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130 return s
131
132class CommentQueue(LineQueue):
133 def __init__(self):
134 LineQueue.__init__(self)
135
136 def add(self, line):
137 if line.strip() == '':
138 LineQueue.add(self, '\n')
139 else:
140 line = ' ' + line[2:-3].rstrip() + '\n'
141 LineQueue.add(self, line)
142
143 def flushTo(self, other_queue):
144 if len(self._queue) == 0:
145 pass
146 elif len(self._queue) == 1:
147 other_queue.add('/*' + self._queue[0][2:].rstrip() + ' */\n')
148 else:
149 other_queue.add('/*\n')
150 LineQueue.flushTo(self, other_queue)
151 other_queue.add('*/\n')
152 self.clear()
153
154# This really seems to be about 4x longer than it needs to be
155def cleanComments(source):

Callers 1

cleanCommentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…