MCPcopy Create free account
hub / github.com/battlecode/battlecode-2018 / to_python

Method to_python

bindings/frankenswig/enums.py:38–41  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

36 return start + s(internal, indent=4) + end
37
38 def to_python(self):
39 start = f'class {self.gen_name}(enum.IntEnum):\n'
40 internal = '\n'.join(f'{name} = {val}' for (name, val) in self.variants)
41 return start + s(internal, indent=4) + '\n'
42
43class CEnumWrapperType(Type):
44 def __init__(self, wrapper, is_ref=False):

Callers 2

python_postfixMethod · 0.45
to_pythonMethod · 0.45

Calls 1

sFunction · 0.85

Tested by

no test coverage detected