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
The latest versions of black change long string literals with implicit concatenation onto one line, violating line length limits, and leave a space between the string literals. The code was previously formatted by black 19.10b0.
To Reproduce
Given the following code, produced by 19.10b0 ...
assertnotextra_files, (
"Found extra SQL file(s) not in execution manifest for %s: %s. Did you add a"" file but forget to put it in the manifest?"% (
os.path.relpath(transform_directory, PROJECT_ROOT),
", ".join(repr(f) forfinextra_files),
)
)
...run a later version on the above code with no arguments and you'll get this:
assert (
notextra_files
), "Found extra SQL file(s) not in execution manifest for %s: %s. Did you add a"" file but forget to put it in the manifest?"% (
os.path.relpath(transform_directory, PROJECT_ROOT),
", ".join(repr(f) forfinextra_files),
)
For this ticket I'm going to ignore the confusing assertion formatting; see #1483 for that.
There are two things wrong here that I'll concern myself with:
The string literals are forced onto one line, far exceeding the line length limit.
Expected behavior
I would expect the original code to be unmodified, or at the very least be reformatted in a way that 1) doesn't exceed the line length limit and 2) doesn't add a space between two string literals.
Environment (please complete the following information):
Version: 20.8b0, 20.8b1, 21.5b0, master
OS: Mac OS 11.2.3
Python 3.7.6 and 3.8.6
Does this bug also happen on master? Yes
The text was updated successfully, but these errors were encountered:
It seems that this no longer causes Black to exceed line length though it does still change this code:
assertnotextra_files, (
"Found extra SQL file(s) not in execution manifest for %s: %s. Did you add a"" file but forget to put it in the manifest?"% (
os.path.relpath(transform_directory, PROJECT_ROOT),
", ".join(repr(f) forfinextra_files),
)
)
into:
assert (
notextra_files
), (
"Found extra SQL file(s) not in execution manifest for %s: %s. Did you add a"" file but forget to put it in the manifest?"% (
os.path.relpath(transform_directory, PROJECT_ROOT),
", ".join(repr(f) forfinextra_files),
)
)
The latest versions of
black
change long string literals with implicit concatenation onto one line, violating line length limits, and leave a space between the string literals. The code was previously formatted byblack
19.10b0.To Reproduce
Given the following code, produced by 19.10b0 ...
...run a later version on the above code with no arguments and you'll get this:
For this ticket I'm going to ignore the confusing assertion formatting; see #1483 for that.
There are two things wrong here that I'll concern myself with:
Expected behavior
I would expect the original code to be unmodified, or at the very least be reformatted in a way that 1) doesn't exceed the line length limit and 2) doesn't add a space between two string literals.
Environment (please complete the following information):
Does this bug also happen on master? Yes
The text was updated successfully, but these errors were encountered: