-
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 and flake8 no longer in sync #4173
Comments
It turns out that the same change also triggers pylint issues: C0321: More than one statement on a single line (multiple-statements) |
Please send a PR to https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html documenting that these formatting rules should be disabled. In general, I'd recommend disabling all formatting-related rules from linters if you use Black. It's Black's job to worry about minutiae of formatting, not yours. |
Black changes witnessed (mainly) include: - addition of blank line between module docstrings and imports - removal of blank lines between class declarations and docstrings - prefer splitting assignment statements on right-hand side - wrap conditional expressions that span multiple lines in parens - put `...` in stubs on same line - add E701 and E704 to flake8 ignore list, see: - https://github.com/psf/black/blob/main/docs/guides/using_black_with_other_tools.md#e701--e704 - psf/black#3887 (E704) - psf/black#4173 (E701)
Black changes witnessed (mainly) include: - addition of blank line between module docstrings and imports - removal of blank lines between class declarations and docstrings - prefer splitting assignment statements on right-hand side - wrap conditional expressions that span multiple lines in parens - put `...` in stubs on same line - add E701 and E704 to flake8 ignore list, see: - https://github.com/psf/black/blob/main/docs/guides/using_black_with_other_tools.md#e701--e704 - psf/black#3887 (E704) - psf/black#4173 (E701)
Black changes witnessed (mainly) include: - addition of blank line between module docstrings and imports - removal of blank lines between class declarations and docstrings - prefer splitting assignment statements on right-hand side - wrap conditional expressions that span multiple lines in parens - put `...` in stubs on same line - add E701 and E704 to flake8 ignore list, see: - https://github.com/psf/black/blob/main/docs/guides/using_black_with_other_tools.md#e701--e704 - psf/black#3887 (E704) - psf/black#4173 (E701)
Black changes witnessed (mainly) include: - addition of blank line between module docstrings and imports - removal of blank lines between class declarations and docstrings - prefer splitting assignment statements on right-hand side - wrap conditional expressions that span multiple lines in parens - put `...` in stubs on same line - add E701 and E704 to flake8 ignore list, see: - https://github.com/psf/black/blob/main/docs/guides/using_black_with_other_tools.md#e701--e704 - psf/black#3887 (E704) - psf/black#4173 (E701)
Black changes witnessed (mainly) include: - addition of blank line between module docstrings and imports - removal of blank lines between class declarations and docstrings - prefer splitting assignment statements on right-hand side - wrap conditional expressions that span multiple lines in parens - put `...` in stubs on same line - add E701 and E704 to flake8 ignore list, see: - https://github.com/psf/black/blob/main/docs/guides/using_black_with_other_tools.md#e701--e704 - psf/black#3887 (E704) - psf/black#4173 (E701)
Describe the bug
Empty classes now format differently between black and what flake8 expects:
To Reproduce
Reformats with the latest black to:
Which then flails flake8 with:
E701 multiple statements on one line (colon)
Expected behavior
Flake8 and black should be compatible in accordance with guidance at: https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
Environment
Additional context
The text was updated successfully, but these errors were encountered: