The rules for breaking long Python lines is changing

RFC-650 has been adopted: we are changing how we break long lines in Python so that binary operators should appear at the beginning of the continued line instead of the end of the previous line.

@timj has kindly updated the developer’s guide.

I will be working through packages updating them. The main change is changing W504 to W503 in the setup.cfg files and fixing the (likely very few) resulting warnings.

In cases where the binary operator is a + joining two strings I plan to simply remove the +.

If you have a global flake8 configuration file (such as ~/.config/flake8) and/or have hard-coded your editor’s flake8 configuration then you may wish to update those configurations.

1 Like

The relevant sections of the Python Style Guide that changed are: