Removed duplicated schematic name in generate command #92

This commit is contained in:
2022-09-17 12:09:05 +02:00
parent dc489cbf7a
commit 61d9912950
9 changed files with 51 additions and 0 deletions

View File

@@ -11,7 +11,13 @@ class ThreadTemplate(TemplateFileABC):
TemplateFileABC.__init__(self)
self._name = f'{String.convert_to_snake_case(name)}_{schematic}.py'
if schematic in name.lower():
self._name = f'{String.convert_to_snake_case(name)}.py'
self._class_name = f'{String.first_to_upper(name)}{schematic_upper}'
if schematic in name.lower():
self._class_name = f'{String.first_to_upper(name)}'
self._path = path
self._value = textwrap.dedent("""\
import threading