sh_cpl/tests/custom/general/.cpl/schematic_custom.py

21 lines
528 B
Python
Raw Permalink Normal View History

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):
2023-02-20 15:55:20 +01:00
GenerateSchematicABC.register(cls, "custom", ["cm", "CM"])