Skip to content

Commit

Permalink
Fixed legacy imports
Browse files Browse the repository at this point in the history
  • Loading branch information
niklas2902 committed Sep 21, 2024
1 parent 361e7f5 commit 41e6903
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions meson_scripts/generate_init_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,31 @@
from typing import TypeVar
from typing import List
import inspect
def SignalArg(name:str, type_:type):
import py4godot.signals as signals
return signals.SignalArg(name, type_)
def signal(args: List[SignalArg]):
import py4godot.signals as signals
signals.signal(args)
import py4godot.pluginscript_api.utils.annotations as annotations
stack = inspect.stack()
name = stack[1].code_context[0].split("=")[0].split(":")[0].strip()
annotations.signal(name, args)
return None
def private(method):
import py4godot.methods as methods
methods.private(method)
return methods.private(method)
def gdclass(cls = None, icon=None):
import py4godot.classes as classes
classes.gdclass(cls, icon)
return classes.gdclass(cls, icon)
T = TypeVar("T")
def gdproperty(type_:type, defaultval:T):
import py4godot.properties as properties
properties.gdproperty(type_, defaultval)
return properties.gdproperty(type_, defaultval)
import py4godot.constants as constants
"""
Expand Down

0 comments on commit 41e6903

Please sign in to comment.