Skip to content

Commit 043cfb9

Browse files
committed
Update GitHub Actions workflow to conditionally exclude regex_parser.py from flake8 checks for Python 3.9
1 parent 790ee7e commit 043cfb9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/python-package.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ jobs:
3030
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3131
- name: Lint with flake8
3232
run: |
33-
# stop the build if there are Python syntax errors or undefined names
34-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
33+
# Conditionally exclude parser/regex_parser.py for Python 3.9
34+
if [ "${{ matrix.python-version }}" = "3.9" ]; then
35+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=parser/regex_parser.py
36+
else
37+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
38+
fi
3539
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3640
flake8 . --count --exit-zero --max-line-length=127 --statistics
3741
- name: Test with pytest

0 commit comments

Comments
 (0)