Skip to content

Commit 5d347a6

Browse files
authored
Fix the format of the .flake8 file, and exclude the script directory from the py2 linter (#1272)
Flake8's INI config file format requires commas after each line. Because our file didn't have them, the exclude list wasn't set up correctly, and the --extend-exclude flag wasn't working. This PR fixes the .flake8 file. Also, update flake8 to the latest version available (because version 3.8 is required to get the --extend-exclude flag) and use the flag to exclude the files in the scripts/ directory from the python2 linter (since the scripts are python3).
1 parent 2d22a55 commit 5d347a6

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ jobs:
6060
apt-get install -q -y python-pip python3-pip
6161
- run: python2 -m pip install --upgrade pip
6262
- run: python3 -m pip install --upgrade pip
63-
- run: python2 -m pip install flake8==3.7.8
64-
- run: python3 -m pip install flake8==3.7.8
65-
- run: python2 -m flake8 --show-source --statistics
63+
- run: python2 -m pip install flake8==3.9.2
64+
- run: python3 -m pip install flake8==3.9.2
65+
- run: python2 -m flake8 --show-source --statistics --extend-exclude=./scripts
6666
- run: python3 -m flake8 --show-source --statistics
6767
test-linux:
6868
executor: bionic

.flake8

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@ ignore =
55
E501, # Line too long
66
E121, # Continuation line under-indented for hanging indent
77
E722 # bare excepts
8+
E741, # Variable names such as 'l', 'O', or 'I'
89
exclude =
9-
./llvm
10-
./gnu
11-
./upstream
12-
./fastcomp
13-
./fastcomp-clang
14-
./releases
15-
./clang
16-
./emscripten
17-
./binaryen
18-
./git
19-
./node
20-
./python
21-
./temp
22-
./downloads
23-
./crunch
10+
./llvm,
11+
./gnu,
12+
./upstream,
13+
./fastcomp,
14+
./fastcomp-clang,
15+
./releases,
16+
./clang,
17+
./emscripten,
18+
./binaryen,
19+
./git,
20+
./node,
21+
./python,
22+
./temp,
23+
./downloads,
24+
./crunch,

0 commit comments

Comments
 (0)