You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected that updating to newer versions of black would maintain compatibility with flake8 by avoiding the E704: multiple statements on one line (def) error, consistent with the behavior observed in previous versions.
PS: Earlier versions of black (e.g., 22.6.0) formatted the ellipsis (...) on the next line, thereby avoiding the E704 error in flake8.
sample code
Before Update (black==22.6.0)
In the previous version of black, the formatter would automatically place the ellipsis (...) on a separate line when formatting functions or methods, like so:
After Update (black==24.3.0)
With the update to black version 24.3.0, the formatting behavior changed. Now, the ellipsis is placed on the same line as the function or method declaration:
$ flake8fileA.py:1440:5: E704 multiple statements on one line (def)fileB.py:1444:5: E704 multiple statements on one line (def)fileC.py:52:5: E704 multiple statements on one line (def)fileD.py:55:5: E704 multiple statements on one line (def)fileE.py:86:5: E704 multiple statements on one line (def)fileF.py:90:5: E704 multiple statements on one line (def)fileG.py:337:5: E704 multiple statements on one line (def)fileH.py:341:5: E704 multiple statements on one line (def)
The text was updated successfully, but these errors were encountered:
camilamacedo86
changed the title
E704 is now conflicting with new black formatting rules
flake8 E704 Errors Triggered by Inline Ellipsis Formatting in Newer black Versions
Mar 22, 2024
how did you install flake8?
unmodified output of
flake8 --bug-report
describe the problem
what I expected to happen
I expected that updating to newer versions of black would maintain compatibility with flake8 by avoiding the
E704: multiple statements on one line (def)
error, consistent with the behavior observed in previous versions.PS: Earlier versions of black (e.g.,
22.6.0
) formatted the ellipsis(...)
on the next line, thereby avoiding the E704 error in flake8.sample code
Before Update (black==22.6.0)
In the previous version of black, the formatter would automatically place the ellipsis
(...)
on a separate line when formatting functions or methods, like so:After Update (black==24.3.0)
With the update to black version
24.3.0
, the formatting behavior changed. Now, the ellipsis is placed on the same line as the function or method declaration:commands ran
The text was updated successfully, but these errors were encountered: