Skip to content

Commit e9aacc3

Browse files
committed
explicitly exclude 'tests' dir in flake8 linting as suggested by albu-diku. There are a few python3-specific built-ins in the unit tests known to fail on python2.
1 parent 22e7dd4 commit e9aacc3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.github/workflows/python-sanity-check.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v3
2222
# NOTE: python-2 is no longer supported here - try with apt
23-
#- name: Set up Python 3.10
24-
# uses: actions/setup-python@v3
25-
# with:
26-
# python-version: "3.10"
2723
- name: Set up Python 2.7 with APT and link to default
2824
run: |
2925
sudo apt install -y python2 python-pip
@@ -36,11 +32,12 @@ jobs:
3632
- name: Lint with flake8
3733
run: |
3834
# TODO: fix unittest dir and remove from excludes
39-
# TODO: fix or migrate legacy grsfs-fuse dir and remove from excludes
35+
# TODO: fix or migrate legacy grsfs-fuse dir and remove from excludes
36+
# TODO: should tests be included here - currently fail on py3-only FileNotFoundError, etc.
4037
# stop the build if there are Python syntax errors or undefined names
41-
flake8 . --exclude=state,envhelp,fixture,output,unittest,grsfs-fuse,irclib.py,seafile-seahub_settings-template.py --count --select=E9,F63,F7,F82 --show-source --statistics
38+
flake8 . --exclude=tests,state,envhelp,fixture,output,unittest,grsfs-fuse,irclib.py,seafile-seahub_settings-template.py --count --select=E9,F63,F7,F82 --show-source --statistics
4239
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
43-
flake8 . --exclude=state,envhelp,fixture,output,unittest,grsfs-fuse,vm-proxy,irclib.py,seafile-seahub_settings-template.py --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
40+
flake8 . --exclude=tests,state,envhelp,fixture,output,unittest,grsfs-fuse,vm-proxy,irclib.py,seafile-seahub_settings-template.py --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
4441
# NOTE: for interactive clean up one can use current ignores
4542
# E501 Ignore long lines, E402 imports below top, E722 bare except,
4643
# F401 unused imports, F502 explicit list in str expand, F841 unused var,

0 commit comments

Comments
 (0)