MCPcopy Index your code
hub / github.com/RustPython/RustPython / call_typing_func_object

Function call_typing_func_object

crates/vm/src/stdlib/_typing.rs:19–27  ·  view source on GitHub ↗
(
    vm: &VirtualMachine,
    func_name: impl AsPyStr<'a>,
    args: impl IntoFuncArgs,
)

Source from the content-addressed store, hash-verified

17}
18
19pub fn call_typing_func_object<'a>(
20 vm: &VirtualMachine,
21 func_name: impl AsPyStr<'a>,
22 args: impl IntoFuncArgs,
23) -> PyResult {
24 let module = vm.import("typing", 0)?;
25 let func = module.get_attr(func_name.as_pystr(&vm.ctx), vm)?;
26 func.call(args, vm)
27}
28
29#[pymodule(name = "_typing", with(super::typevar::typevar))]
30pub(crate) mod decl {

Callers 4

type_checkFunction · 0.85
__typing_subst__Method · 0.85
type_checkFunction · 0.85

Calls 4

as_pystrMethod · 0.80
importMethod · 0.45
get_attrMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected