@@ -9,12 +9,14 @@ class SCIMClientError(Exception):
99 caused the exception.
1010 """
1111
12- def __init__ (self , message : str , source : Any = None , * args , ** kwargs ):
12+ def __init__ (
13+ self , message : str , source : Any = None , * args : Any , ** kwargs : Any
14+ ) -> None :
1315 self .message = message
1416 self .source = source
1517 super ().__init__ (* args , ** kwargs )
1618
17- def __str__ (self ):
19+ def __str__ (self ) -> str :
1820 return self .message or "UNKNOWN"
1921
2022
@@ -29,7 +31,7 @@ class RequestNetworkError(SCIMRequestError):
2931 The original :class:`~httpx.RequestError` is available with :attr:`~BaseException.__cause__`.
3032 """
3133
32- def __init__ (self , * args , ** kwargs ) :
34+ def __init__ (self , * args : Any , ** kwargs : Any ) -> None :
3335 message = kwargs .pop ("message" , "Network error happened during request" )
3436 super ().__init__ (message , * args , ** kwargs )
3537
@@ -54,7 +56,7 @@ class RequestPayloadValidationError(SCIMRequestError):
5456 print("Original validation error cause", exc.__cause__)
5557 """
5658
57- def __init__ (self , * args , ** kwargs ) :
59+ def __init__ (self , * args : Any , ** kwargs : Any ) -> None :
5860 message = kwargs .pop ("message" , "Server request payload validation error" )
5961 super ().__init__ (message , * args , ** kwargs )
6062
@@ -69,7 +71,7 @@ class SCIMResponseErrorObject(SCIMResponseError):
6971 Those errors are only raised when the :code:`raise_scim_errors` parameter is :data:`True`.
7072 """
7173
72- def __init__ (self , obj , * args , ** kwargs ) :
74+ def __init__ (self , obj : Any , * args : Any , ** kwargs : Any ) -> None :
7375 message = kwargs .pop (
7476 "message" , f"The server returned a SCIM Error object: { obj } "
7577 )
@@ -79,7 +81,7 @@ def __init__(self, obj, *args, **kwargs):
7981class UnexpectedStatusCode (SCIMResponseError ):
8082 """Error raised when a server returned an unexpected status code for a given :class:`~scim2_models.Context`."""
8183
82- def __init__ (self , status_code : int , * args , ** kwargs ) :
84+ def __init__ (self , status_code : int , * args : Any , ** kwargs : Any ) -> None :
8385 message = kwargs .pop (
8486 "message" , f"Unexpected response status code: { status_code } "
8587 )
@@ -89,15 +91,15 @@ def __init__(self, status_code: int, *args, **kwargs):
8991class UnexpectedContentType (SCIMResponseError ):
9092 """Error raised when a server returned an unexpected `Content-Type` header in a response."""
9193
92- def __init__ (self , content_type , * args , ** kwargs ) :
94+ def __init__ (self , content_type : str , * args : Any , ** kwargs : Any ) -> None :
9395 message = kwargs .pop ("message" , f"Unexpected content type: { content_type } " )
9496 super ().__init__ (message , * args , ** kwargs )
9597
9698
9799class UnexpectedContentFormat (SCIMResponseError ):
98100 """Error raised when a server returned a response in a non-JSON format."""
99101
100- def __init__ (self , * args , ** kwargs ) :
102+ def __init__ (self , * args : Any , ** kwargs : Any ) -> None :
101103 message = kwargs .pop ("message" , "Unexpected response content format" )
102104 super ().__init__ (message , * args , ** kwargs )
103105
@@ -117,6 +119,6 @@ class ResponsePayloadValidationError(SCIMResponseError):
117119 print("Original validation error cause", exc.__cause__)
118120 """
119121
120- def __init__ (self , * args , ** kwargs ) :
122+ def __init__ (self , * args : Any , ** kwargs : Any ) -> None :
121123 message = kwargs .pop ("message" , "Server response payload validation error" )
122124 super ().__init__ (message , * args , ** kwargs )
0 commit comments