Skip to content

Commit 95135b3

Browse files
Merge pull request #52 from AbcSxyZ/qa/pylint
configure pylint for tests
2 parents 334736d + b3a0aef commit 95135b3

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.github/workflows/lint-py.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,11 @@ jobs:
2424
- name: Checkout
2525
uses: actions/checkout@v2
2626

27-
- name: Run linter
28-
run: find . -name "*.py" | xargs pylint
27+
- name: Run linter for images code
28+
run: find . -name "*.py" ! -path "*/tests/*" | xargs pylint
29+
30+
- name: Install pylint dependencies for tests
31+
run: pip3 install pytest
32+
33+
- name: Run linter for tests code
34+
run: find "./tests" -name "*.py" | xargs pylint --rcfile=pylintrc.tests

pylintrc.tests

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[tests-configuration]
2+
disable = duplicate-code, # Tests having similar code
3+
no-member, # pytest global variables in conftest.py not detected
4+
consider-using-with, # conftest temporary directory would need a with
5+
import-error # EntrypointHook unable to import entrypoint
6+
7+

0 commit comments

Comments
 (0)