From 61b074f672cdbdb0ad9d3f3519b61e99c7143244 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 10 Oct 2020 15:28:35 -0700 Subject: [PATCH] [skip changelog] Resolve impossible to satisfy flake8 configuration Flake8/pycodestyle has a pair of mutually exclusive checks: - W503: line break before binary operator - W504: line break after binary operator Having both these checks enabled results in a failed check when there is a line break at a binary operator that can't be resolved by moving the operator. PEP 8 recommends line break before the binary operator, so the logical choice between the two checks is W504. --- .flake8 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index 48bac2f2003..0301b4263dd 100644 --- a/.flake8 +++ b/.flake8 @@ -2,4 +2,8 @@ [flake8] max-line-length = 120 -ignore = E741 +ignore = + E741, + # W503 and W504 are mutually exclusive, so one or the other must be ignored. + # PEP 8 recommends line break before, so we keep W504. + W503