@@ -456,7 +456,7 @@ def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = N
456456 :param str data: A str using RestAPI structure. JSON by default.
457457 :param str content_type: JSON by default, set application/xml if XML.
458458 :returns: An instance of this model
459- :raises: DeserializationError if something went wrong
459+ :raises DeserializationError: if something went wrong
460460 :rtype: ModelType
461461 """
462462 deserializer = Deserializer (cls ._infer_class_models ())
@@ -479,7 +479,7 @@ def from_dict(
479479 :param function key_extractors: A key extractor function.
480480 :param str content_type: JSON by default, set application/xml if XML.
481481 :returns: An instance of this model
482- :raises: DeserializationError if something went wrong
482+ :raises DeserializationError: if something went wrong
483483 :rtype: ModelType
484484 """
485485 deserializer = Deserializer (cls ._infer_class_models ())
@@ -626,7 +626,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to
626626 :param object target_obj: The data to be serialized.
627627 :param str data_type: The type to be serialized from.
628628 :rtype: str, dict
629- :raises: SerializationError if serialization fails.
629+ :raises SerializationError: if serialization fails.
630630 :returns: The serialized data.
631631 """
632632 key_transformer = kwargs .get ("key_transformer" , self .key_transformer )
@@ -736,8 +736,8 @@ def body(self, data, data_type, **kwargs):
736736 :param object data: The data to be serialized.
737737 :param str data_type: The type to be serialized from.
738738 :rtype: dict
739- :raises: SerializationError if serialization fails.
740- :raises: ValueError if data is None
739+ :raises SerializationError: if serialization fails.
740+ :raises ValueError: if data is None
741741 :returns: The serialized request body
742742 """
743743
@@ -781,8 +781,8 @@ def url(self, name, data, data_type, **kwargs):
781781 :param str data_type: The type to be serialized from.
782782 :rtype: str
783783 :returns: The serialized URL path
784- :raises: TypeError if serialization fails.
785- :raises: ValueError if data is None
784+ :raises TypeError: if serialization fails.
785+ :raises ValueError: if data is None
786786 """
787787 try :
788788 output = self .serialize_data (data , data_type , ** kwargs )
@@ -805,8 +805,8 @@ def query(self, name, data, data_type, **kwargs):
805805 :param object data: The data to be serialized.
806806 :param str data_type: The type to be serialized from.
807807 :rtype: str, list
808- :raises: TypeError if serialization fails.
809- :raises: ValueError if data is None
808+ :raises TypeError: if serialization fails.
809+ :raises ValueError: if data is None
810810 :returns: The serialized query parameter
811811 """
812812 try :
@@ -835,8 +835,8 @@ def header(self, name, data, data_type, **kwargs):
835835 :param object data: The data to be serialized.
836836 :param str data_type: The type to be serialized from.
837837 :rtype: str
838- :raises: TypeError if serialization fails.
839- :raises: ValueError if data is None
838+ :raises TypeError: if serialization fails.
839+ :raises ValueError: if data is None
840840 :returns: The serialized header
841841 """
842842 try :
@@ -855,9 +855,9 @@ def serialize_data(self, data, data_type, **kwargs):
855855
856856 :param object data: The data to be serialized.
857857 :param str data_type: The type to be serialized from.
858- :raises: AttributeError if required data is None.
859- :raises: ValueError if data is None
860- :raises: SerializationError if serialization fails.
858+ :raises AttributeError: if required data is None.
859+ :raises ValueError: if data is None
860+ :raises SerializationError: if serialization fails.
861861 :returns: The serialized data.
862862 :rtype: str, int, float, bool, dict, list
863863 """
@@ -1192,7 +1192,7 @@ def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument
11921192
11931193 :param Datetime attr: Object to be serialized.
11941194 :rtype: str
1195- :raises: TypeError if format invalid.
1195+ :raises TypeError: if format invalid.
11961196 :return: serialized rfc
11971197 """
11981198 try :
@@ -1218,7 +1218,7 @@ def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument
12181218
12191219 :param Datetime attr: Object to be serialized.
12201220 :rtype: str
1221- :raises: SerializationError if format invalid.
1221+ :raises SerializationError: if format invalid.
12221222 :return: serialized iso
12231223 """
12241224 if isinstance (attr , str ):
@@ -1251,7 +1251,7 @@ def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument
12511251
12521252 :param Datetime attr: Object to be serialized.
12531253 :rtype: int
1254- :raises: SerializationError if format invalid
1254+ :raises SerializationError: if format invalid
12551255 :return: serialied unix
12561256 """
12571257 if isinstance (attr , int ):
@@ -1488,7 +1488,7 @@ def __call__(self, target_obj, response_data, content_type=None):
14881488 :param str target_obj: Target data type to deserialize to.
14891489 :param requests.Response response_data: REST response object.
14901490 :param str content_type: Swagger "produces" if available.
1491- :raises: DeserializationError if deserialization fails.
1491+ :raises DeserializationError: if deserialization fails.
14921492 :return: Deserialized object.
14931493 :rtype: object
14941494 """
@@ -1502,7 +1502,7 @@ def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return
15021502
15031503 :param str target_obj: Target data type to deserialize to.
15041504 :param object data: Object to deserialize.
1505- :raises: DeserializationError if deserialization fails.
1505+ :raises DeserializationError: if deserialization fails.
15061506 :return: Deserialized object.
15071507 :rtype: object
15081508 """
@@ -1713,7 +1713,7 @@ def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-
17131713
17141714 :param str data: The response string to be deserialized.
17151715 :param str data_type: The type to deserialize to.
1716- :raises: DeserializationError if deserialization fails.
1716+ :raises DeserializationError: if deserialization fails.
17171717 :return: Deserialized object.
17181718 :rtype: object
17191719 """
@@ -1795,7 +1795,7 @@ def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return
17951795 :param dict attr: Dictionary to be deserialized.
17961796 :return: Deserialized object.
17971797 :rtype: dict
1798- :raises: TypeError if non-builtin datatype encountered.
1798+ :raises TypeError: if non-builtin datatype encountered.
17991799 """
18001800 if attr is None :
18011801 return None
@@ -1841,7 +1841,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return
18411841 :param str data_type: deserialization data type.
18421842 :return: Deserialized basic type.
18431843 :rtype: str, int, float or bool
1844- :raises: TypeError if string format is not valid.
1844+ :raises TypeError: if string format is not valid.
18451845 """
18461846 # If we're here, data is supposed to be a basic type.
18471847 # If it's still an XML node, take the text
@@ -1932,7 +1932,7 @@ def deserialize_bytearray(attr):
19321932 :param str attr: response string to be deserialized.
19331933 :return: Deserialized bytearray
19341934 :rtype: bytearray
1935- :raises: TypeError if string format invalid.
1935+ :raises TypeError: if string format invalid.
19361936 """
19371937 if isinstance (attr , ET .Element ):
19381938 attr = attr .text
@@ -1945,7 +1945,7 @@ def deserialize_base64(attr):
19451945 :param str attr: response string to be deserialized.
19461946 :return: Deserialized base64 string
19471947 :rtype: bytearray
1948- :raises: TypeError if string format invalid.
1948+ :raises TypeError: if string format invalid.
19491949 """
19501950 if isinstance (attr , ET .Element ):
19511951 attr = attr .text
@@ -1960,7 +1960,7 @@ def deserialize_decimal(attr):
19601960
19611961 :param str attr: response string to be deserialized.
19621962 :return: Deserialized decimal
1963- :raises: DeserializationError if string format invalid.
1963+ :raises DeserializationError: if string format invalid.
19641964 :rtype: decimal
19651965 """
19661966 if isinstance (attr , ET .Element ):
@@ -1978,7 +1978,7 @@ def deserialize_long(attr):
19781978 :param str attr: response string to be deserialized.
19791979 :return: Deserialized int
19801980 :rtype: long or int
1981- :raises: ValueError if string format invalid.
1981+ :raises ValueError: if string format invalid.
19821982 """
19831983 if isinstance (attr , ET .Element ):
19841984 attr = attr .text
@@ -1991,7 +1991,7 @@ def deserialize_duration(attr):
19911991 :param str attr: response string to be deserialized.
19921992 :return: Deserialized duration
19931993 :rtype: TimeDelta
1994- :raises: DeserializationError if string format invalid.
1994+ :raises DeserializationError: if string format invalid.
19951995 """
19961996 if isinstance (attr , ET .Element ):
19971997 attr = attr .text
@@ -2009,7 +2009,7 @@ def deserialize_date(attr):
20092009 :param str attr: response string to be deserialized.
20102010 :return: Deserialized date
20112011 :rtype: Date
2012- :raises: DeserializationError if string format invalid.
2012+ :raises DeserializationError: if string format invalid.
20132013 """
20142014 if isinstance (attr , ET .Element ):
20152015 attr = attr .text
@@ -2025,7 +2025,7 @@ def deserialize_time(attr):
20252025 :param str attr: response string to be deserialized.
20262026 :return: Deserialized time
20272027 :rtype: datetime.time
2028- :raises: DeserializationError if string format invalid.
2028+ :raises DeserializationError: if string format invalid.
20292029 """
20302030 if isinstance (attr , ET .Element ):
20312031 attr = attr .text
@@ -2040,7 +2040,7 @@ def deserialize_rfc(attr):
20402040 :param str attr: response string to be deserialized.
20412041 :return: Deserialized RFC datetime
20422042 :rtype: Datetime
2043- :raises: DeserializationError if string format invalid.
2043+ :raises DeserializationError: if string format invalid.
20442044 """
20452045 if isinstance (attr , ET .Element ):
20462046 attr = attr .text
@@ -2063,7 +2063,7 @@ def deserialize_iso(attr):
20632063 :param str attr: response string to be deserialized.
20642064 :return: Deserialized ISO datetime
20652065 :rtype: Datetime
2066- :raises: DeserializationError if string format invalid.
2066+ :raises DeserializationError: if string format invalid.
20672067 """
20682068 if isinstance (attr , ET .Element ):
20692069 attr = attr .text
@@ -2101,7 +2101,7 @@ def deserialize_unix(attr):
21012101 :param int attr: Object to be serialized.
21022102 :return: Deserialized datetime
21032103 :rtype: Datetime
2104- :raises: DeserializationError if format invalid
2104+ :raises DeserializationError: if format invalid
21052105 """
21062106 if isinstance (attr , ET .Element ):
21072107 attr = int (attr .text ) # type: ignore
0 commit comments