diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-10-24 10:35:01 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-10-24 10:39:03 +0100 |
commit | ef771cc4c2d988e5188ba7e75df9adebb0ebafe1 (patch) | |
tree | ebab02095acf97b5a4d4a03c4570acc6baaa1323 /setup.cfg | |
parent | Merge pull request #4075 from matrix-org/rav/fix_pusher_logcontexts (diff) | |
download | synapse-ef771cc4c2d988e5188ba7e75df9adebb0ebafe1.tar.xz |
Fix a number of flake8 errors
Broadly three things here: * disable W504 which seems a bit whacko * remove a bunch of `as e` expressions from exception handlers that don't use them * use `r""` for strings which include backslashes Also, we don't use pep8 any more, so we can get rid of the duplicate config there.
Diffstat (limited to 'setup.cfg')
-rw-r--r-- | setup.cfg | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/setup.cfg b/setup.cfg index 52feaa9cc7..b6b4aa740d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,17 +14,16 @@ ignore = pylint.cfg tox.ini -[pep8] -max-line-length = 90 -# W503 requires that binary operators be at the end, not start, of lines. Erik -# doesn't like it. E203 is contrary to PEP8. E731 is silly. -ignore = W503,E203,E731 - [flake8] -# note that flake8 inherits the "ignore" settings from "pep8" (because it uses -# pep8 to do those checks), but not the "max-line-length" setting max-line-length = 90 -ignore=W503,E203,E731 + +# see https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes +# for error codes. The ones we ignore are: +# W503: line break before binary operator +# W504: line break after binary operator +# E203: whitespace before ':' (which is contrary to pep8?) +# E731: do not assign a lambda expression, use a def +ignore=W503,W504,E203,E731 [isort] line_length = 89 |