Skip to content

Commit d75fadd

Browse files
committed
add gihub ci for pylint
Change-Id: I97c4f18a4fa0a9b4e7a20dd1a422075eecb30d0a
1 parent 1330c0e commit d75fadd

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

.github/workflows/pylint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
pip install pylint
2121
- name: Analysing the code with pylint
2222
run: |
23-
pylint $(git ls-files '*.py')
23+
pylint --rcfile pylint.rc $(git ls-files '*.py')

conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
'''
2+
Used to manage perf unit test
3+
'''
14
import pytest
25
def pytest_addoption(parser):
36
parser.addoption("--runperf", action="store_true",
47
help="run perf tests")
58

69
def pytest_runtest_setup(item):
710
if 'perf' in item.keywords and not item.config.getoption("--runperf"):
8-
pytest.skip("need --runperf option to run")
11+
pytest.skip("need --runperf option to run")

hdrh/codec.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636

3737
import zlib
3838

39-
from pyhdrh import add_array # pylint: disable=no-name-in-module
40-
from pyhdrh import decode # pylint: disable=no-name-in-module
41-
from pyhdrh import encode # pylint: disable=no-name-in-module
39+
from pyhdrh import add_array # pylint: disable=no-name-in-module,import-error
40+
from pyhdrh import decode # pylint: disable=no-name-in-module,import-error
41+
from pyhdrh import encode # pylint: disable=no-name-in-module,import-error
4242

4343
V2_ENCODING_COOKIE_BASE = 0x1c849303
4444
V2_COMPRESSION_COOKIE_BASE = 0x1c849304

setup.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
'''
2+
Setup
3+
'''
14
import sys
25
from setuptools import setup
36
from setuptools import Extension
@@ -7,15 +10,15 @@
710
class Tox(test):
811
def initialize_options(self):
912
test.initialize_options(self)
10-
self.tox_args = None
13+
self.tox_args = None # pylint: disable=attribute-defined-outside-init
1114

1215
def finalize_options(self):
1316
test.finalize_options(self)
1417
self.test_args = []
15-
self.test_suite = True
18+
self.test_suite = True # pylint: disable=attribute-defined-outside-init
1619

1720
def run_tests(self):
18-
import tox
21+
import tox # pylint: disable=import-outside-toplevel
1922
sys.exit(tox.cmdline())
2023

2124

test/test_hdrhistogram.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939

4040
import pytest
4141

42-
from pyhdrh import add_array # pylint: disable=no-name-in-module
43-
from pyhdrh import encode # pylint: disable=no-name-in-module
44-
from pyhdrh import decode # pylint: disable=no-name-in-module
42+
from pyhdrh import add_array # pylint: disable=no-name-in-module,import-error
43+
from pyhdrh import encode # pylint: disable=no-name-in-module,import-error
44+
from pyhdrh import decode # pylint: disable=no-name-in-module,import-error
4545

4646
from hdrh.histogram import HdrHistogram
4747
from hdrh.log import HistogramLogWriter

0 commit comments

Comments
 (0)