Skip to content

Commit ac68995

Browse files
committed
Add flake8 configuration file
After blackening the repo I saw that the Travis build was failing. I saw that it was due to incompatibility between default the default flake8 configuration and the newly blackened code. So I added the .flake8 configuration file we use in skeleton-python-library as an interim to fully switching this project over to GitHub Actions from Travis.
1 parent 6cb6ddb commit ac68995

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.flake8

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[flake8]
2+
max-line-length = 80
3+
# Select (turn on)
4+
# * Complexity violations reported by mccabe (C) -
5+
# http://flake8.pycqa.org/en/latest/user/error-codes.html#error-violation-codes
6+
# * Documentation conventions compliance reported by pydocstyle (D) -
7+
# http://www.pydocstyle.org/en/stable/error_codes.html
8+
# * Default errors and warnings reported by pycodestyle (E and W) -
9+
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
10+
# * Default errors reported by pyflakes (F) -
11+
# http://flake8.pycqa.org/en/latest/glossary.html#term-pyflakes
12+
# * Default warnings reported by flake8-bugbear (B) -
13+
# https://github.com/PyCQA/flake8-bugbear#list-of-warnings
14+
# * The B950 flake8-bugbear opinionated warning -
15+
# https://github.com/PyCQA/flake8-bugbear#opinionated-warnings
16+
select = C,D,E,F,W,B,B950
17+
# Ignore flake8's default warning about maximum line length, which has
18+
# a hard stop at the configured value. Instead we use
19+
# flake8-bugbear's B950, which allows up to 10% overage.
20+
#
21+
# Also ignore flake8's warning about line breaks before binary
22+
# operators. It no longer agrees with PEP8. See, for example, here:
23+
# https://github.com/ambv/black/issues/21. Guido agrees here:
24+
# https://github.com/python/peps/commit/c59c4376ad233a62ca4b3a6060c81368bd21e85b.
25+
ignore = E501,W503

0 commit comments

Comments
 (0)