black icon indicating copy to clipboard operation
black copied to clipboard

Does flake8 still ignore W503 by default?

Open ichard26 opened this issue 2 years ago • 4 comments

Suspect regression. Using v 4.0.1 (Gentoo X86_64). Having just installed black (v22.1.0), reformatting produced multiple W503 messages. Attempted to utilize extended-ignore and reloaded/rescanned project. Warnings persisted. I ensured no W503/W504 ignores were present in code or configuration. Only after adding explicitly W503 to extended-ignore would flake8 be satisfied.

Originally posted by @scottfurry in https://github.com/psf/black/issues/1661#issuecomment-1048462407

ichard26 avatar Mar 15 '22 16:03 ichard26

I can't reproduce this behaviour but I'm no flake8 pro. If it turns out flake8 requires ignoring W503 line break before binary operator then let's add it back to the compatible configuration docs (don't forget to explain why it should be ignored like the others!)

ichard26 avatar Mar 15 '22 17:03 ichard26

I feel like it's better to err on the side of listing more codes in our docs, just in case people explicitly turn on the code or flake8 changes its mind about defaults.

JelleZijlstra avatar Mar 15 '22 17:03 JelleZijlstra

it's still in the default ignores for the latest flake8 (flake8 --help) image

my guess is they might have used --ignore in one of their configs to try and ignore another error rather than --extend-ignore and overwritten the default list, hence why they then need to re-add it in. image

The black docs already have a warning against enabling W503 and the above flake8 behaviour is in their documentation

jpy-git avatar Mar 16 '22 11:03 jpy-git

Hey all, is this issue still available to take up?

HamishPoole avatar Sep 25 '22 07:09 HamishPoole

can i claim this issue?

ArjunYaduvanshi02 avatar Feb 08 '23 11:02 ArjunYaduvanshi02

jpy-git's comment is correct. I'm not sure I see anything additional for us to do.

hauntsaninja avatar Jul 09 '23 22:07 hauntsaninja