sh_cpl/tests/custom/general/.cpl/schematic_custom.py
2023-02-20 15:55:20 +01:00

21 lines
528 B
Python

from cpl_cli.abc.generate_schematic_abc import GenerateSchematicABC
class Custom(GenerateSchematicABC):
def __init__(self, *args: str):
GenerateSchematicABC.__init__(self, *args)
def get_code(self) -> str:
code = """\
class $Name:
def __init__(self):
print('hello')
"""
x = self.build_code_str(code, Name=self._class_name)
return x
@classmethod
def register(cls):
GenerateSchematicABC.register(cls, "custom", ["cm", "CM"])