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

Commit 2998a6a

Browse files
authored
Drop Python 2.7 and release 2.0.0 (#4)
1 parent 408b955 commit 2998a6a

File tree

6 files changed

+15
-25
lines changed

6 files changed

+15
-25
lines changed

.travis.yml

-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ language: python
22
dist: xenial
33
matrix:
44
include:
5-
- python: 2.7
65
- python: 3.5
76
- python: 3.6
87
- python: 3.7
98
- python: 3.8
10-
- python: pypy
119
- python: pypy3
1210

1311
install:

README.rst

+5
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ Convert it to JUnit XML format:
5656
Releases
5757
--------
5858

59+
2.0.0 - 2020-03-29
60+
^^^^^^^^^^^^^^^^^^
61+
62+
- Drop Python 2.7
63+
5964
1.3.0 - 2019-12-15
6065
^^^^^^^^^^^^^^^^^^
6166

cpplint_junit.py

+6-15
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,14 @@
77
import os
88
import re
99
import sys
10-
from typing import Dict, List # noqa
10+
from typing import Dict, List
1111
from xml.etree import ElementTree
1212

1313
from exitstatus import ExitStatus
1414

1515

1616
class CpplintError(object):
17-
def __init__(self,
18-
file, # type: str
19-
line, # type: int
20-
message # type: str
21-
):
22-
# type: () -> CpplintError
17+
def __init__(self, file: str, line: int, message: str) -> None:
2318
"""Constructor.
2419
2520
Args:
@@ -32,16 +27,14 @@ def __init__(self,
3227
self.message = message
3328

3429

35-
def parse_arguments():
36-
# type: () -> argparse.Namespace
30+
def parse_arguments() -> argparse.Namespace:
3731
parser = argparse.ArgumentParser(description='Converts cpplint output to JUnit XML format.')
3832
parser.add_argument('input_file', type=str, help='cpplint stdout text file.')
3933
parser.add_argument('output_file', type=str, help='JUnit XML output file.')
4034
return parser.parse_args()
4135

4236

43-
def parse_cpplint(file_name):
44-
# type: (str) -> Dict[str, List[CpplintError]]
37+
def parse_cpplint(file_name: str) -> Dict[str, List[CpplintError]]:
4538
"""Parses a cpplint output file.
4639
4740
Args:
@@ -69,8 +62,7 @@ def parse_cpplint(file_name):
6962
return errors
7063

7164

72-
def generate_test_suite(errors):
73-
# type: (Dict[str, List[CpplintError]]) -> ElementTree.ElementTree
65+
def generate_test_suite(errors: Dict[str, List[CpplintError]]) -> ElementTree.ElementTree:
7466
"""Creates a JUnit XML tree from parsed cpplint errors.
7567
7668
Args:
@@ -100,8 +92,7 @@ def generate_test_suite(errors):
10092
return ElementTree.ElementTree(test_suite)
10193

10294

103-
def main(): # pragma: no cover
104-
# type: () -> ExitStatus
95+
def main() -> ExitStatus: # pragma: no cover
10596
"""Main function.
10697
10798
Returns:

requirements.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
exitstatus
2-
typing
1+
exitstatus

setup.cfg

-5
This file was deleted.

setup.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
name='cpplint-junit',
6-
version='1.3.0',
6+
version='2.0.0',
77

88
description='Converts cpplint output to JUnit format.',
99
long_description=open('README.rst').read(),
@@ -15,9 +15,11 @@
1515

1616
py_modules=['cpplint_junit'],
1717
install_requires=open('requirements.txt').readlines(),
18+
python_requires='<=3.5',
1819
zip_safe=False,
1920

2021
license='MIT',
22+
license_files=['LICENSE.txt'],
2123
classifiers=[
2224
'Development Status :: 4 - Beta',
2325
'Environment :: Console',

0 commit comments

Comments
 (0)