Skip to content

Commit f4f5f49

Browse files
committed
Add flake8 to Travis config and README
1 parent 8081c85 commit f4f5f49

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ python:
77
- "3.7"
88
install:
99
- pip install pylint
10+
- pip install flake8
1011
- pip install pytest --upgrade
1112
script:
1213
- pylint *.py
14+
- flake8 *.py
1315
- pytest

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,26 +127,31 @@ $ python -m pytest && python3 -m pytest
127127

128128
### Coding Style
129129

130-
The code in the script is written to follow [the PEP8 style guide](https://www.python.org/dev/peps/pep-0008/).
131-
There is a pylint configuration file to check the coding style. You can install pylint
132-
with pip.
130+
The code in the script is written to follow
131+
[the PEP8 style guide](https://www.python.org/dev/peps/pep-0008/).
132+
Both pylint and flake8 are used to check the coding style. You can install
133+
both with pip.
133134

134135
```
135136
$ sudo pip install pylint
137+
$ sudo pip install flake8
136138
```
137139

138140
Or, for Python 3:
139141

140142
```
141143
$ sudo pip3 install pylint
144+
$ sudo pip3 install flake8
142145
```
143146

144-
You can run the linter by running `pylint *.py` in the top directory of the repository.
145-
If you have both Python 2.7 and Python 3 installed, you can run the linter with
146-
both versions with this command:
147+
You can run the linters by running `pylint *.py` and `flake8 *.py` in the top
148+
directory of the repository.
149+
If you have both Python 2.7 and Python 3 installed, you can run the linters
150+
with both versions with these commands:
147151

148152
```
149153
$ python -m pylint *.py && python3 -m pylint *.py
154+
$ python -m flake8 *.py && python3 -m flake8 *.py
150155
```
151156

152157
License

0 commit comments

Comments
 (0)