def get_metrics(self):
if(self.sloc == <NUM_LIT:0>):<EOL><INDENT>if(self.comments == <NUM_LIT:0>):<EOL><INDENT>ratio_comment_to_code = <NUM_LIT><EOL><DEDENT>else:<EOL><INDENT>ratio_comment_to_code = <NUM_LIT><EOL><DEDENT><DEDENT>else:<EOL><INDENT>ratio_comment_to_code = float(self.comments) / self.sloc<EOL><DEDENT>metrics = OrderedDict([('<STR_LIT>', self.sloc), ('<STR_LIT>', self.comments),<EOL>('<STR_LIT>', round(ratio_comment_to_code, <NUM_LIT:2>))])<EOL>return metrics<EOL>
Calculate ratio_comment_to_code and return with the other values