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
Copy this code (it needs to be copied as it contains \u2001 character at the end of first docstring line):
deffoo():
"""A special character: ` ` """
Run Black on it with the default configuration.
See error:
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: /tmp/blk_o610r37n.log
--- src+++ dst@@ -16,11 +16,11 @@
body=
Expr(
value=
Constant(
value=
- 'A special character: `\u2001\n`', # str+ 'A special character: `\n`', # str
) # /Constant
) # /Expr
decorator_list=
name=
'foo', # str
Expected behavior
No error
Environment:
Version: both stable and master
OS and Python version: Windows/Python 3.8 (as well as whatever is running on Black Playground)
Does this bug also happen on master? Yes
Additional context
None
The text was updated successfully, but these errors were encountered:
This is https://www.compart.com/en/unicode/U+2001, a whitespace character, so presumably we're stripping it as trailing whitespace in the docstring processing code, but not accepting the change in the safety check. Shouldn't be hard to fix.
Describe the bug
To Reproduce
\u2001
character at the end of first docstring line):Expected behavior
No error
Environment:
Does this bug also happen on master? Yes
Additional context
None
The text was updated successfully, but these errors were encountered: