We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a107192 commit b3c7b3bCopy full SHA for b3c7b3b
custom_components/pyscript/eval.py
@@ -535,8 +535,17 @@ async def eval_decorators(self, ast_ctx):
535
else:
536
dec_funcs.append(await ast_ctx.aeval(dec))
537
538
+ def make_dec_call(func):
539
+ async def dec_call(*args_tuple, **kwargs):
540
+ args = list(args_tuple)
541
+ if len(args) > 0 and isinstance(args[0], AstEval):
542
+ args.pop(0)
543
+ return await func(ast_ctx, *args, **kwargs)
544
+
545
+ return dec_call
546
547
for func in reversed(dec_funcs):
- self.call = await ast_ctx.call_func(func, None, self.call)
548
+ self.call = await ast_ctx.call_func(func, None, make_dec_call(self.call))
549
550
ast_ctx.code_str, ast_ctx.code_list = code_str, code_list
551
0 commit comments