Format Python files with ruff

This commit is contained in:
Simon Hausmann 2025-02-12 23:06:38 +01:00 committed by Simon Hausmann
parent 9001966dc9
commit 3358bc24e3
15 changed files with 261 additions and 191 deletions

View file

@ -10,12 +10,15 @@ import typing
def test_callback_gc() -> None:
compiler = native.Compiler()
compdef = compiler.build_from_source("""
compdef = compiler.build_from_source(
"""
export component Test {
out property <string> test-value: "Ok";
callback test-callback(string) -> string;
}
""", "").component("Test")
""",
"",
).component("Test")
assert compdef != None
instance: native.ComponentInstance | None = compdef.create()
@ -30,8 +33,7 @@ def test_callback_gc() -> None:
handler: Handler | None = Handler(instance)
assert handler is not None
instance.set_callback(
"test-callback", handler.python_callback)
instance.set_callback("test-callback", handler.python_callback)
handler = None
assert instance.invoke("test-callback", "World") == "WorldOk"