11from  __future__ import  annotations 
22import  json 
3- from  typing  import  Optional 
43from  sys  import  getsizeof 
54
65
@@ -9,25 +8,31 @@ def _camelcased(value: str) -> str:
98  return  capitalized [0 ].lower () +  capitalized [1 :]
109
1110
11+ # pylint: disable=too-many-arguments 
1212class  FabricError (Exception ):
13-   context : Optional [ dict [str , str ]] 
13+   context : dict [str , str ]  |   None 
1414  description : str 
1515  http_code : int  =  500 
16-   name : Optional [ str ] 
16+   name : str   |   None 
1717  return_value : int 
1818
1919  def  __init__ (
2020      self ,
21-       context : Optional [dict [str , str ]] =  None ,
22-       description : Optional [str ] =  None ,
23-       http_code : Optional [int ] =  None ,
24-       name : Optional [str ] =  None ):
21+       context : dict [str , str ] |  None  =  None ,
22+       description : str  |  None  =  None ,
23+       http_code : int  |  None  =  None ,
24+       name : str  =  None ,
25+       return_value : int  |  None  =  None ,
26+       ** kwargs ):
2527    self .context  =  context 
28+     self .name  =  name 
29+ 
2630    if  description :
2731      self .description  =  description 
28-     if  http_code :
29-       self .http_code  =  http_code 
30-     self .name  =  name 
32+     if  http_code  or  kwargs .get ('httpCode' , None ):
33+       self .http_code  =  http_code  or  kwargs .get ('httpCode' , None )
34+     if  return_value  or  kwargs .get ('returnValue' , None ):
35+       self .return_value  =  return_value  or  kwargs .get ('returnValue' , None )
3136
3237  def  __iter__ (self ):
3338    yield  from  {
0 commit comments