We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is another one from #1053
$ cat backslashdoc.py def xxx_xxxxxx_xxxxx_xx_xxxx(): """xxxxxx x xxxx xx xx xxxxxxxx xxx xxxxx xx xxx xxxxxxx xxxxxx. xxxx_xx = xx - (1 + xxxxxxxx_xxxx) xxxx_xx_xxxxx = xx - (1 + xxxxxxxx_xxxx) - (xxxxxx - 1) \ = xx - (xxxxxxxx_xxxx + xxxxxx) xxx xxxxx xxxxx xxxxxxxxxxxx xxxx xxx xxxxxxx xxxx xxxx xxxxxxx xx """ $ black backslashdoc.py error: cannot format backslashdoc.py: INTERNAL ERROR: Black produced code that is not equivalent to the source. Please report a bug on https://github.com/psf/black/issues. This diff might be helpful: /var/folders/wx/zkst6jdx1zg_s32d23gz4_0r0000gn/T/blk_hx7_mm1z.log Oh no! 💥 💔 💥 1 file failed to reformat. $ cat /var/folders/wx/zkst6jdx1zg_s32d23gz4_0r0000gn/T/blk_hx7_mm1z.log --- src +++ dst @@ -16,11 +16,11 @@ body= Expr( value= Constant( value= - 'xxxxxx x xxxx xx xx xxxxxxxx xxx xxxxx xx xxx xxxxxxx xxxxxx.\n\nxxxx_xx = xx - (1 + xxxxxxxx_xxxx)\nxxxx_xx_xxxxx = xx - (1 + xxxxxxxx_xxxx) - (xxxxxx - 1) = xx - (xxxxxxxx_xxxx + xxxxxx)\n\nxxx xxxxx xxxxx xxxxxxxxxxxx xxxx xxx xxxxxxx xxxx xxxx xxxxxxx xx', # str + 'xxxxxx x xxxx xx xx xxxxxxxx xxx xxxxx xx xxx xxxxxxx xxxxxx.\n\nxxxx_xx = xx - (1 + xxxxxxxx_xxxx)\nxxxx_xx_xxxxx = xx - (1 + xxxxxxxx_xxxx) - (xxxxxx - 1) = xx - (xxxxxxxx_xxxx + xxxxxx)\n\nxxx xxxxx xxxxx xxxxxxxxxxxx xxxx xxx xxxxxxx xxxx xxxx xxxxxxx xx', # str ) # /Constant ) # /Expr decorator_list= name= 'xxx_xxxxxx_xxxxx_xx_xxxx', # str
The text was updated successfully, but these errors were encountered:
Fixed by #1623 as now Black ignores docstrings with backslash newline escapes.
black/src/black/__init__.py
Lines 2040 to 2042 in 9270a10
(black-rHKUX7ap) R:\Programming\black>git fetch upstream [snip] (black-rHKUX7ap) R:\Programming\black>git merge upstream/master [snip] (black-rHKUX7ap) R:\Programming\black>cat temp.py 'cat' is not recognized as an internal or external command, operable program or batch file. (black-rHKUX7ap) R:\Programming\black>type temp.py def xxx_xxxxxx_xxxxx_xx_xxxx(): """xxxxxx x xxxx xx xx xxxxxxxx xxx xxxxx xx xxx xxxxxxx xxxxxx. xxxx_xx = xx - (1 + xxxxxxxx_xxxx) xxxx_xx_xxxxx = xx - (1 + xxxxxxxx_xxxx) - (xxxxxx - 1) \ = xx - (xxxxxxxx_xxxx + xxxxxx) xxx xxxxx xxxxx xxxxxxxxxxxx xxxx xxx xxxxxxx xxxx xxxx xxxxxxx xx """ (black-rHKUX7ap) R:\Programming\black>black temp.py --check would reformat temp.py Oh no! 💥 💔 💥 1 file would be reformatted.
Sorry, something went wrong.
No branches or pull requests
This is another one from #1053
The text was updated successfully, but these errors were encountered: