Closed sigmaSd closed 3 weeks ago
Looks like we need to setup __signature__
attribute
Its not setable,
import { PyObject } from "../others/deno_python/src/python.ts";
import { python } from "/home/mrcool/dev/deno/others/deno_python/mod.ts";
const inspect = python.import("inspect");
const c = PyObject.from(python.callback(() => {}));
c.setAttr("__text_signature__", "hello");
inspect.signature(c);
error: Uncaught (in promise) PythonError: attribute '__text_signature__' of 'builtin_function_or_method' objects is
I feel like the issue is different, the issue is somehow the callbacks are considered builtin despite they're not
Actually maybe its normal that its called builtin, since its coming from the c api, so I guess the question is how to add signature attribute
This requires this pr https://github.com/denosaurs/deno_python/pull/65 to work, otherwise it will segfault