Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
implement _idfunc
Signed-off-by: Ashwin Naren <[email protected]>
  • Loading branch information
arihant2math committed Apr 22, 2025
commit 53d396065da8236b860529371961c6c1a5f98361
8 changes: 5 additions & 3 deletions vm/src/stdlib/typing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub(crate) mod _typing {
use crate::{
PyObjectRef, PyPayload, PyResult, VirtualMachine,
builtins::{PyGenericAlias, PyTupleRef, PyTypeRef, pystr::AsPyStr},
function::IntoFuncArgs,
function::{FuncArgs, IntoFuncArgs},
};

pub(crate) fn _call_typing_func_object<'a>(
Expand All @@ -20,8 +20,10 @@ pub(crate) mod _typing {
// func.call(args, vm)
}

#[pyattr]
pub(crate) fn _idfunc(_vm: &VirtualMachine) {}
#[pyfunction]
pub(crate) fn _idfunc(args: FuncArgs, _vm: &VirtualMachine) -> PyObjectRef {
args.args[0].clone()
}

#[pyattr]
#[pyclass(name = "TypeVar")]
Expand Down
Loading