@@ -72,10 +72,10 @@ impl PyBaseException {
7272 }
7373
7474 #[ pyproperty( setter) ]
75- fn set_args ( & self , args : PyIterable , vm : & VirtualMachine ) -> PyResult {
75+ fn set_args ( & self , args : PyIterable , vm : & VirtualMachine ) -> PyResult < ( ) > {
7676 let args = args. iter ( vm) ?. collect :: < PyResult < Vec < _ > > > ( ) ?;
7777 self . args . replace ( PyTuple :: from ( args) . into_ref ( vm) ) ;
78- Ok ( vm . get_none ( ) )
78+ Ok ( ( ) )
7979 }
8080
8181 #[ pyproperty( name = "__traceback__" ) ]
@@ -84,9 +84,8 @@ impl PyBaseException {
8484 }
8585
8686 #[ pyproperty( name = "__traceback__" , setter) ]
87- fn set_traceback ( & self , traceback : Option < PyTracebackRef > , vm : & VirtualMachine ) -> PyResult {
87+ fn set_traceback ( & self , traceback : Option < PyTracebackRef > , _vm : & VirtualMachine ) {
8888 self . traceback . replace ( traceback) ;
89- Ok ( vm. get_none ( ) )
9089 }
9190
9291 #[ pyproperty( name = "__cause__" ) ]
@@ -95,9 +94,8 @@ impl PyBaseException {
9594 }
9695
9796 #[ pyproperty( name = "__cause__" , setter) ]
98- fn set_cause ( & self , cause : Option < PyObjectRef > , vm : & VirtualMachine ) -> PyResult {
97+ fn set_cause ( & self , cause : Option < PyObjectRef > , _vm : & VirtualMachine ) {
9998 self . cause . replace ( cause) ;
100- Ok ( vm. get_none ( ) )
10199 }
102100
103101 #[ pyproperty( name = "__context__" ) ]
@@ -106,9 +104,8 @@ impl PyBaseException {
106104 }
107105
108106 #[ pyproperty( name = "__context__" , setter) ]
109- fn set_context ( & self , context : Option < PyObjectRef > , vm : & VirtualMachine ) -> PyResult {
107+ fn set_context ( & self , context : Option < PyObjectRef > , _vm : & VirtualMachine ) {
110108 self . context . replace ( context) ;
111- Ok ( vm. get_none ( ) )
112109 }
113110
114111 #[ pyproperty( name = "__suppress_context__" ) ]
@@ -117,9 +114,8 @@ impl PyBaseException {
117114 }
118115
119116 #[ pyproperty( name = "__suppress_context__" , setter) ]
120- fn set_suppress_context ( & self , suppress_context : bool , vm : & VirtualMachine ) -> PyResult {
117+ fn set_suppress_context ( & self , suppress_context : bool , _vm : & VirtualMachine ) {
121118 self . suppress_context . set ( suppress_context) ;
122- Ok ( vm. get_none ( ) )
123119 }
124120
125121 #[ pymethod]
0 commit comments