MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / convertSection

Function convertSection

db_update.py:348–357  ·  view source on GitHub ↗
(sectionData)

Source from the content-addressed store, hash-verified

346 data = _readData('phobos', 'traits')
347
348 def convertSection(sectionData):
349 sectionLines = []
350 headerText = '<b>{}</b>'.format(sectionData['header'])
351 sectionLines.append(headerText)
352 for bonusData in sectionData['bonuses']:
353 prefix = '{} '.format(bonusData['number']) if 'number' in bonusData else ''
354 bonusText = '{}{}'.format(prefix, bonusData['text'].replace('\u00B7', '\u2022 '))
355 sectionLines.append(bonusText)
356 sectionLine = '<br />\n'.join(sectionLines)
357 return sectionLine
358
359 newData = []
360 for row in data:

Callers 1

processTraitsFunction · 0.85

Calls 2

replaceMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected