-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Black folds ellipsis (...
) symbol like class test: ...
, which causes flake8
to raise E701
error.
#4213
Comments
...
) symbol like class test: ...
causes flake8
to raise E701
error....
) symbol like class test: ...
, which causes flake8
to raise E701
error.
This issue may be related to this one: The problem is that |
Duplicate of #4173 |
@dankrzeminski32 Thank you for finding this! Since it duplicates, should I close this issue now? |
The recommendation is to turn off this lint rule. Personally I'd recommend turning off any formatting-related rules from your linter; if you choose to use Black, formatting is Black's job, not your linter's. |
@cainmagi I believe so, feel free to consult the updated docs related to this issue. |
The issue
The newest
black
folds the ellipsis (...
) to the previous line. This change may violateflake8
E701
rule if ellipsis is used for defining a class.To Reproduce the issue
The following codes will not raise
flake8
errors:After running
black
, the results areNote that the function
test
will not raiseE701
, however the class definition will.This issue may be caused by a bug of
flake8
. But I am not sure whetherblack
is the one that should be changed because I remember that the previous version ofblack
will not fold the...
to the previous line.Additional context
black version: 24.1.1
flake8 version: 7.0.0 (mccabe: 0.7.0, pycodestyle: 2.11.1, pyflakes: 3.2.0)
python version: 3.9.0
The text was updated successfully, but these errors were encountered: