MCPcopy Create free account
hub / github.com/ElementsProject/lightning / chunk

Function chunk

devtools/sql-rewrite.py:196–208  ·  view source on GitHub ↗
(pofile)

Source from the content-addressed store, hash-verified

194 # return them as a list.
195
196 def chunk(pofile):
197 # Chunk a given file into chunks separated by an empty line
198 with open(pofile, 'r') as f:
199 chunk = []
200 for line in f:
201 line = line.strip()
202 if line.strip() == "":
203 yield chunk
204 chunk = []
205 else:
206 chunk.append(line.strip())
207 if chunk != []:
208 yield chunk
209
210 colhtables = {}
211 queries = []

Callers 1

extract_queriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected