Skip to content

Commit

Permalink
Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
lmazuel committed Feb 2, 2017
1 parent cfc0f37 commit 6f32061
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions msrest/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 6f32061

Please sign in to comment.