From 6f3206191fc13860405fb968d1136cac8a11b58a Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 2 Feb 2017 10:42:45 -0800 Subject: [PATCH] Clean code --- msrest/serialization.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/msrest/serialization.py b/msrest/serialization.py index f748b1089f..6b2bd58a1c 100644 --- a/msrest/serialization.py +++ b/msrest/serialization.py @@ -247,9 +247,6 @@ def _serialize(self, target_obj, data_type=None, **kwargs): try: attributes = target_obj._attribute_map - # should be useless since we add the attribute in the subclasses - # self._classify_data(target_obj, class_name, serialized) - for attr, map in attributes.items(): attr_name = attr debug_name = "{}.{}".format(class_name, attr_name) @@ -285,19 +282,6 @@ def _serialize(self, target_obj, data_type=None, **kwargs): else: return serialized - def _classify_data(self, target_obj, class_name, serialized): - """Check whether this object is a child and therefor needs to be - classified in the message. - """ - try: - for _type, _classes in target_obj._get_subtype_map().items(): - for ref, name in _classes.items(): - if name == class_name: - # FIXME! do NOT use _type, isnce it's the Python one. Look at attribute map - serialized[_type] = ref - except AttributeError: - pass # TargetObj has no _subtype_map so we don't need to classify. - def body(self, data, data_type, **kwargs): """Serialize data intended for a request body.