From 3ea947e37a523536463ac405b7eab2586ccce259 Mon Sep 17 00:00:00 2001 From: Simon Wiles Date: Thu, 18 Jun 2020 23:01:09 -0700 Subject: [PATCH] Ignore "line too long" errors from flake8 on db migrations Black reformats these files before flake8 lints them, but: * it doesn't (yet) wrap the long strings (see https://github.com/psf/black/issues/182); * it has issues with inserting trailing commas on nested collections, regularly resulting in causing pycodestyle E231 errors. A case could be made for excluding db migrations from linting altogether, tbh. --- .flake8 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.flake8 b/.flake8 index 6329dc3..de3612b 100644 --- a/.flake8 +++ b/.flake8 @@ -1,9 +1,14 @@ [flake8] +# B950 line too long +# E231 missing whitespace after ‘,’ # E266 too many leading ‘#’ for block comment # E303 too many blank lines (3) +# E501 line too long # F403 ‘from module import *’ used; unable to detect undefined names # W503 line break before binary operator ignore = E266, E303, F403, W503 max-line-length = 89 max-complexity = 18 select = B,C,E,F,T,W,B9 +per-file-ignores = + */migrations/*:B950, E231, E501