You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ok, but why are we doing that? What is the purpose of having a separate item without `self` just to re-assign to self at the end of the method?
readability-wise this is a very long method, effectively what we seem to want is:
def_get_mappings(self, test, definitions) ->MappingsifdefinitionsisNoneornotdefinitions.has_cluster_by_name(cluster_name):
returnMappings(None,None,None)
ifself.is_attribute:
returnself.get_attribute_mappings(test, definitions)
ifself.is_event:
returnself.get_event_mappings(test, definitions)
# assume we are a command (can this be checked?)returnself.get_command_mappings(test, definitions)
defget_attribute_mappings(self, test, definitions):
# .....returnMappings(arguments=..., response=..., name=...)
#...def_update_mappings(self, test, definitions):
mappings=self._get_mappings(test, definitions)
# TODO: if we have a mappings dataclass, may as well not have 3 self variables# and just have self.mappings ....self.argument_mapping=mappings.argumentsself.response_mapping=mappings.responseself.response_mapping_name=mappings.name
readability-wise this is a very long method, effectively what we seem to want is:
Originally posted by @andy31415 in #25109 (comment)
The text was updated successfully, but these errors were encountered: