1717import zitadel_client .rest_response
1818from zitadel_client import rest
1919from zitadel_client .api_response import ApiResponse
20+
21+ # noinspection PyPep8Naming
2022from zitadel_client .api_response import T as ApiResponseT
2123from zitadel_client .auth .no_auth_authenticator import NoAuthAuthenticator
2224from zitadel_client .configuration import Configuration
@@ -85,6 +87,7 @@ def set_default_header(self, header_name: str, header_value: str) -> None:
8587
8688 _default = None
8789
90+ # noinspection PyUnusedLocal
8891 @no_type_check
8992 def param_serialize (
9093 self ,
@@ -102,6 +105,7 @@ def param_serialize(
102105 _request_auth = None ,
103106 ) -> RequestSerialized :
104107 """Builds the HTTP request params needed by the request.
108+ :param files:
105109 :param _host:
106110 :param auth_settings:
107111 :param method: Method to call.
@@ -319,6 +323,7 @@ def deserialize(self, response_text: str, response_type: str, content_type: Opti
319323 # fetch data from response object
320324 if content_type is None :
321325 try :
326+ # noinspection PyUnusedLocal
322327 data = json .loads (response_text )
323328 except ValueError :
324329 data = response_text
@@ -331,13 +336,14 @@ def deserialize(self, response_text: str, response_type: str, content_type: Opti
331336 data = ""
332337 else :
333338 data = json .loads (response_text )
334- elif re .match (r"^text\ /[a-z.+-]+\s*(;|$)" , content_type , re .IGNORECASE ):
339+ elif re .match (r"^text/[a-z.+-]+\s*(;|$)" , content_type , re .IGNORECASE ):
335340 data = response_text
336341 else :
337342 raise ApiException (status = 0 , reason = "Unsupported content type: {0}" .format (content_type ))
338343
339344 return self .__deserialize (data , response_type )
340345
346+ # noinspection PyNestedDecorators
341347 @no_type_check
342348 @staticmethod
343349 def __deserialize (data , klass ): # noqa C901 too complex
@@ -355,7 +361,6 @@ def __deserialize(data, klass): # noqa C901 too complex
355361 if klass .startswith ("List[" ):
356362 m = re .match (r"List\[(.*)]" , klass )
357363 assert m is not None , "Malformed List type definition"
358- sub_kls = m .group (1 )
359364 return [ApiClient .__deserialize (sub_data ) for sub_data in data ]
360365
361366 if klass .startswith ("Dict[" ):
@@ -385,6 +390,7 @@ def __deserialize(data, klass): # noqa C901 too complex
385390 else :
386391 return ApiClient .__deserialize_model (data , klass )
387392
393+ # noinspection PyNestedDecorators
388394 @no_type_check
389395 @staticmethod
390396 def parameters_to_tuples (params , collection_formats ):
@@ -416,6 +422,7 @@ def parameters_to_tuples(params, collection_formats):
416422 new_params .append ((k , v ))
417423 return new_params
418424
425+ # noinspection PyNestedDecorators
419426 @no_type_check
420427 @staticmethod
421428 def parameters_to_url_query (params , collection_formats ): # noqa C901 too complex
@@ -502,6 +509,7 @@ def select_header_accept(accepts: List[str]) -> Optional[str]:
502509
503510 return accepts [0 ]
504511
512+ # noinspection PyNestedDecorators
505513 @no_type_check
506514 @staticmethod
507515 def select_header_content_type (content_types ):
@@ -519,6 +527,7 @@ def select_header_content_type(content_types):
519527
520528 return content_types [0 ]
521529
530+ # noinspection PyNestedDecorators
522531 @no_type_check
523532 @staticmethod
524533 def __deserialize_file (response ):
@@ -549,6 +558,7 @@ def __deserialize_file(response):
549558
550559 return path
551560
561+ # noinspection PyNestedDecorators
552562 @no_type_check
553563 @staticmethod
554564 def __deserialize_primitive (data , klass ):
@@ -566,6 +576,7 @@ def __deserialize_primitive(data, klass):
566576 except TypeError :
567577 return data
568578
579+ # noinspection PyNestedDecorators
569580 @no_type_check
570581 @staticmethod
571582 def __deserialize_object (value ):
@@ -575,6 +586,7 @@ def __deserialize_object(value):
575586 """
576587 return value
577588
589+ # noinspection PyNestedDecorators
578590 @no_type_check
579591 @staticmethod
580592 def __deserialize_date (string ):
@@ -590,6 +602,7 @@ def __deserialize_date(string):
590602 except ValueError as err :
591603 raise rest .ApiException (status = 0 , reason = "Failed to parse `{0}` as date object" .format (string )) from err
592604
605+ # noinspection PyNestedDecorators
593606 @no_type_check
594607 @staticmethod
595608 def __deserialize_datetime (string ):
@@ -607,6 +620,7 @@ def __deserialize_datetime(string):
607620 except ValueError as err :
608621 raise rest .ApiException (status = 0 , reason = ("Failed to parse `{0}` as datetime object" .format (string ))) from err
609622
623+ # noinspection PyNestedDecorators
610624 @no_type_check
611625 @staticmethod
612626 def __deserialize_enum (data , klass ):
@@ -621,6 +635,7 @@ def __deserialize_enum(data, klass):
621635 except ValueError as err :
622636 raise rest .ApiException (status = 0 , reason = ("Failed to parse `{0}` as `{1}`" .format (data , klass ))) from err
623637
638+ # noinspection PyNestedDecorators
624639 @no_type_check
625640 @staticmethod
626641 def __deserialize_model (data , klass : Any ):
@@ -633,6 +648,7 @@ def __deserialize_model(data, klass: Any):
633648
634649 return klass .from_dict (data )
635650
651+ # noinspection PyNestedDecorators
636652 @no_type_check
637653 @classmethod
638654 def get_default (cls ):
0 commit comments