-
-
Notifications
You must be signed in to change notification settings - Fork 388
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
Outdated information about black incompatibilities #890
Comments
@uhbif19 thanks for the clarification! Do you want to send a PR with |
I am not sure what does I can make PR if waiting couple of weeks is okay. Also looks like black is now leaving trailing commas, if python36 support is enabled, if I understand objective in your doc correcly. Black doc says:
https://black.readthedocs.io/en/stable/the_black_code_style.html?highlight=flake8#trailing-commas |
Yeap, Several weeks are totally fine, no pressure here. |
Hi @uhbif19, how's it going? Do you need any help on this one? |
Have not touched that issue, so far. I plan to see it this weekend. |
Thanks a lot! 👍 |
Done steps If I understand correctly to add I tried to format codebase with configured Then I check, if reformated codebase matches flake8 checks.
Description of incompatibilities C812 - appears in case when all arguments are on the same line, but brackets are on surrounding lines (checked 5 examples). Example of incompatible code, formatted with black:
D202 appears only in case, when local function comes right after docstring (i checked about 5 examples of error). Example of incompatible code, formatted with black:
E203 is known incompability betweeen flake8 and black. They claim that is W503 is known incompability betweeen black and pycodestyle. Black claims that W503 is against PEP8. pycodestyle docs says that W503 is disabled by default, because "they are not rules unanimously accepted, and PEP 8 does not enforce them". psf/black#52 WPS317 in all, but one, cases is encountered in comples
WPS348 - looks like black has different strategy on such cases https://black.readthedocs.io/en/stable/the_black_code_style.html#call-chains |
That's exactly what we can use in the docs about incompatibilities! Great job! Thanks a lot. 👍 |
According to @ferdnyc at psf/black#1196 (comment)
|
@DonaldTsang thanks! Are you willing to send a PR with the fix? |
I would love to edit the text to reflect what the people have said regarding the attempt to make black compatible with WPS. Also another note:
|
Awesome, thanks! |
@sobolevn I am not sure what now, doc PR is required? If so, can you say what are requirements for this doc changes? |
Yes, I would say so.
I guess that #890 (comment) is enough for now. |
@sobolevn @uhbif19 editing text with https://hackmd.io/3vzJNofVQ_G0aS_QWwvLQA |
I am removing this page, since we now use |
Bug report
What's wrong
Documentation states that project is is not compatible with black. As far, as I know, some points are not relevant now.
There is option for skipping this check now: psf/black#118 (comment)
Black now supports changing line length too. In our setup it has not problems with flake8.
There is still issue with trailing commas, I guess. While this does not trigger
flake8
itself.How is that should be
Sentence
And there’s no configuration to fix it!
must be somehow corrected, for example by adding instructions for making black work with project.System information
Not relevant.
The text was updated successfully, but these errors were encountered: