This repository was archived by the owner on Feb 19, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +32
-3
lines changed
Expand file tree Collapse file tree 4 files changed +32
-3
lines changed Original file line number Diff line number Diff line change 1+ all : build test install
2+
3+ build :
4+ python setup.py build
5+
6+ install : build
7+ python setup.py develop
8+
9+ test : pep8 pyflakes
10+
11+ # requires "pip install pep8"
12+ pep8 :
13+ @git ls-files | grep \\ .py$ | xargs pep8
14+
15+ # requires "pip install pyflakes"
16+ pyflakes :
17+ @export PYFLAKES_NODOCTEST=1 && \
18+ git ls-files | grep \\ .py$ | xargs pyflakes
19+
20+ upload :
21+ python setup.py sdist bdist_wheel upload
Original file line number Diff line number Diff line change 22# This flag says that the code is written to work on both Python 2 and Python
33# 3. If at all possible, it is good practice to do this. If you cannot, you
44# will need to generate wheels for each Python version that you support.
5- universal =1
5+ universal =1
6+
7+ [pep8]
8+ max_line_length = 120
Original file line number Diff line number Diff line change 1313setup (
1414 name = 'codacy-coverage' ,
1515
16- version = '1.0.0 ' ,
16+ version = '1.0.1 ' ,
1717
1818 description = 'Codacy coverage reporter for Python' ,
1919 long_description = long_description ,
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ def parse_report_file(report_file):
2727 """Parse XML file and POST it to the Codacy API"""
2828
2929 # Convert decimal string to floored int percent value
30- percent = lambda s : int (float (s ) * 100 )
30+ def percent (s ):
31+ float (s ) * 100
3132
3233 # Parse the XML into the format expected by the API
3334 report_xml = minidom .parse (report_file )
@@ -94,6 +95,10 @@ def run():
9495 if not args .commit :
9596 args .commit = get_git_revision_hash ()
9697
98+ if not os .path .isfile (args .report ):
99+ logging .error ("Coverage report " + args .report + " not found." )
100+ exit (1 )
101+
97102 logging .info ("Parsing report file..." )
98103 report = parse_report_file (args .report )
99104
You can’t perform that action at this time.
0 commit comments