Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit 684cae7

Browse files
author
Daniel Reigada
committed
Remove unnecessary 'floor' calls
1 parent c9ae61f commit 684cae7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/codacy/reporter.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import logging
77
import os
88
from xml.dom import minidom
9-
from math import floor
109

1110
import requests
1211
from requests.packages.urllib3 import util as urllib3_util
@@ -104,8 +103,8 @@ def merge_and_round_reports(report_list):
104103

105104
# Round all total values
106105
for file_entry in final_report['fileReports']:
107-
file_entry['total'] = int(floor(file_entry['total']))
108-
final_report['total'] = int(floor(final_report['total']))
106+
file_entry['total'] = int(file_entry['total'])
107+
final_report['total'] = int(final_report['total'])
109108

110109
return final_report
111110

@@ -115,7 +114,7 @@ def parse_report_file(report_file, git_directory):
115114
:param report_file:
116115
"""
117116

118-
# Convert decimal string to floored decimal percent value
117+
# Convert decimal string to decimal percent value
119118
def percent(s):
120119
return float(s) * 100
121120

0 commit comments

Comments
 (0)