Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
nutti committed Sep 22, 2024
1 parent 2dbc0d1 commit 204b75b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/fake_bpy_module/generator/writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def _write_function_code(self, func_node: FunctionNode) -> None:
gen_types = ""
if "generic-types" in func_node.attributes:
gen_types = f"[{func_node.attributes['generic-types']}]"
print(f"@@@@ {gen_types} : {func_name}")
wt.add(f"def {func_name}{gen_types}(")

start_kwarg = False
Expand Down Expand Up @@ -296,7 +297,7 @@ def _write_class_code(self, class_node: ClassNode) -> None:
gen_types = ""
if "generic-types" in class_node.attributes:
gen_types = f"[{class_node.attributes['generic-types']}]"
print(f"@@@@ {gen_types}")
print(f"@@@@ {gen_types} : {name_node.astext()}")

if base_class_list_node.empty():
wt.addln(f"class {name_node.astext()}{gen_types}:")
Expand Down Expand Up @@ -381,6 +382,7 @@ def _write_class_code(self, class_node: ClassNode) -> None:
gen_types = ""
if "generic-types" in method_node.attributes:
gen_types = f"[{method_node.attributes['generic-types']}]"
print(f"@@@@ {gen_types} : {name_node.astext()}")
if func_type in ("function", "method"):
if not arg_list_node.empty():
wt.add(f"def {name_node.astext()}{gen_types}(self, ")
Expand Down

0 comments on commit 204b75b

Please sign in to comment.