Skip to content

Commit a2ec58b

Browse files
committed
don't check py2vs3/py3.py when running lint test with Python 2, and vice versa
1 parent 00db387 commit a2ec58b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/linting.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,10 @@ jobs:
2222
2323
- name: Run flake8 to verify PEP8-compliance of Python code
2424
run: |
25-
flake8 --exclude ./easybuild/tools/py2vs3/py3.py
25+
# don't check py2vs3/py3.py when testing with Python 2, and vice versa
26+
if [[ "${{ matrix.python-version }}" =~ "2." ]]; then
27+
py_excl=py3
28+
else
29+
py_excl=py2
30+
fi
31+
flake8 --exclude ./easybuild/tools/py2vs3/${py_excl}.py

0 commit comments

Comments
 (0)