Skip to content

Commit 6f32061

Browse files
committed
Clean code
1 parent cfc0f37 commit 6f32061

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

msrest/serialization.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,6 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
247247

248248
try:
249249
attributes = target_obj._attribute_map
250-
# should be useless since we add the attribute in the subclasses
251-
# self._classify_data(target_obj, class_name, serialized)
252-
253250
for attr, map in attributes.items():
254251
attr_name = attr
255252
debug_name = "{}.{}".format(class_name, attr_name)
@@ -285,19 +282,6 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
285282
else:
286283
return serialized
287284

288-
def _classify_data(self, target_obj, class_name, serialized):
289-
"""Check whether this object is a child and therefor needs to be
290-
classified in the message.
291-
"""
292-
try:
293-
for _type, _classes in target_obj._get_subtype_map().items():
294-
for ref, name in _classes.items():
295-
if name == class_name:
296-
# FIXME! do NOT use _type, isnce it's the Python one. Look at attribute map
297-
serialized[_type] = ref
298-
except AttributeError:
299-
pass # TargetObj has no _subtype_map so we don't need to classify.
300-
301285
def body(self, data, data_type, **kwargs):
302286
"""Serialize data intended for a request body.
303287

0 commit comments

Comments
 (0)