Update signature of __repr__ and __reduce__ method of Ellipsis
use crate::function::PyFuncArgs;
-use crate::pyobject::{PyContext, PyResult};
+use crate::pyobject::{PyContext, PyEllipsisRef, PyResult};
use crate::vm::VirtualMachine;
pub fn init(context: &PyContext) {
@@ -15,12 +15,10 @@ fn ellipsis_new(vm: &VirtualMachine, args: PyFuncArgs) -> PyResult {
Ok(vm.ctx.ellipsis())
}
-fn ellipsis_repr(vm: &VirtualMachine, args: PyFuncArgs) -> PyResult {
- arg_check!(vm, args, required = [(_cls, None)]);
- Ok(vm.new_str("Ellipsis".to_string()))
+fn ellipsis_repr(_self: PyEllipsisRef, _vm: &VirtualMachine) -> String {
+ "Ellipsis".to_string()
}
-fn ellipsis_reduce(vm: &VirtualMachine, args: PyFuncArgs) -> PyResult {
- arg_check!(vm, args, required = [(_cls, None)]);
- Ok(vm.new_str("Ellipsis".to_string()))
+fn ellipsis_reduce(_self: PyEllipsisRef, _vm: &VirtualMachine) -> String {
+ "Ellipsis".to_string()
}
