Function
type_check
(arg: PyObjectRef, msg: &str, vm: &VirtualMachine)
Source from the content-addressed store, hash-verified
| 15 | }; |
| 16 | |
| 17 | fn type_check(arg: PyObjectRef, msg: &str, vm: &VirtualMachine) -> PyResult<PyObjectRef> { |
| 18 | // Calling typing.py here leads to bootstrapping problems |
| 19 | if vm.is_none(&arg) { |
| 20 | return Ok(arg.class().to_owned().into()); |
| 21 | } |
| 22 | let message_str: PyObjectRef = vm.ctx.new_str(msg).into(); |
| 23 | call_typing_func_object(vm, "_type_check", (arg, message_str)) |
| 24 | } |
| 25 | |
| 26 | fn variance_repr( |
| 27 | name: &str, |
Tested by
no test coverage detected