This repository was archived by the owner on Feb 19, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 66import os
77from xml .dom import minidom
88import requests
9+ from math import floor
910
1011logging .basicConfig (level = logging .INFO ,
1112 format = '%(asctime)s - %(levelname)s - %(message)s' )
@@ -61,7 +62,7 @@ def parse_report_file(report_file):
6162
6263 # Convert decimal string to floored int percent value
6364 def percent (s ):
64- return float (s ) * 100
65+ return int ( floor ( float (s ) * 100 ))
6566
6667 # Parse the XML into the format expected by the API
6768 report_xml = minidom .parse (report_file )
Original file line number Diff line number Diff line change 11{
2- "total" : 50.0 ,
2+ "total" : 50 ,
33 "fileReports" : [
44 {
5- "total" : 66.67 ,
5+ "total" : 66 ,
66 "coverage" : {
77 "1" : 1 ,
88 "4" : 1
99 },
1010 "filename" : " src/codacy/__init__.py"
1111 },
1212 {
13- "total" : 49.15 ,
13+ "total" : 49 ,
1414 "coverage" : {
1515 "50" : 1 ,
1616 "60" : 1 ,
Original file line number Diff line number Diff line change 11{
2- "total" : 50.0 ,
2+ "total" : 50 ,
33 "fileReports" : [
44 {
5- "total" : 66.67 ,
5+ "total" : 66 ,
66 "coverage" : {
77 "1" : 1 ,
88 "4" : 1
99 },
1010 "filename" : " src/codacy/__init__.py"
1111 },
1212 {
13- "total" : 49.15 ,
13+ "total" : 49 ,
1414 "coverage" : {
1515 "50" : 1 ,
1616 "60" : 1 ,
You can’t perform that action at this time.
0 commit comments