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

Function need_adapt

crates/stdlib/src/_sqlite3.rs:807–817  ·  view source on GitHub ↗
(obj: &PyObject, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

805 }
806
807 fn need_adapt(obj: &PyObject, vm: &VirtualMachine) -> bool {
808 if BASE_TYPE_ADAPTED.get().is_some() {
809 true
810 } else {
811 let cls = obj.class();
812 !(cls.is(vm.ctx.types.int_type)
813 || cls.is(vm.ctx.types.float_type)
814 || cls.is(vm.ctx.types.str_type)
815 || cls.is(vm.ctx.types.bytearray_type))
816 }
817 }
818
819 static_cell! {
820 static CONVERTERS: PyDictRef;

Callers 1

bind_parameterMethod · 0.85

Calls 3

isMethod · 0.80
getMethod · 0.45
classMethod · 0.45

Tested by

no test coverage detected