MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / parseMutantAttrs

Function parseMutantAttrs

service/port/muta.py:74–90  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

72
73
74def parseMutantAttrs(line):
75 mutations = {}
76 pairs = [p.strip() for p in line.split(',')]
77 for pair in pairs:
78 try:
79 attrName, value = pair.split(' ')
80 except ValueError:
81 continue
82 try:
83 value = float(value)
84 except (ValueError, TypeError):
85 continue
86 attrInfo = getAttributeInfo(attrName.strip())
87 if attrInfo is None:
88 continue
89 mutations[attrInfo.ID] = value
90 return mutations
91
92
93def parseDynamicItemString(text):

Callers 2

_resolve_moduleFunction · 0.90
parseMutantFunction · 0.85

Calls 1

getAttributeInfoFunction · 0.90

Tested by

no test coverage detected