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
We are using latest black 23.1.0 and it is putting .format after string making line longer than required.
Solution is to use experimental-string-processing however it will probably be removed due to its functionality moved to future.
However the problem is that future contains also other improvements and we don't want the style to change with each black upgrade.
Code runned with black (note line is 125 lines long and too long and flake8 checking breaks):
importdatetimeimportlogginglogger=logging.getLogger(__name__)
if__name__=="__main__":
delay_until_gt=datetime.datetime.now()
logger.info(
"Resetting delay_until for all tasks virtual command queue objects that have delay greater or equal than {0}".format(
delay_until_gt
)
)
Code runned with black (experimental-string-processing = true):
importdatetimeimportlogginglogger=logging.getLogger(__name__)
if__name__=="__main__":
delay_until_gt=datetime.datetime.now()
logger.info(
"Resetting delay_until for all tasks virtual command queue objects that have delay greater or equal than {0}"
.format(delay_until_gt)
)
And run it with these arguments:
$ black --target-version py38 file.py
$ black --target-version py38 --experimental-string-processing file.py
Expected behavior
I should get line no longer than 120 chars
Environment
Black's version: 23.1.0
OS and Python version: MacOSX Ventura 13.2 python 3.8, Amazon Linux 2023 -> python 3.11
The text was updated successfully, but these errors were encountered:
As you say, this is fixed in the preview style, and therefore likely to be in the stable style for next year. Our policy is not to change the style during the year, so there's nothing else to do here.
Describe the bug
We are using latest black 23.1.0 and it is putting .format after string making line longer than required.
Solution is to use experimental-string-processing however it will probably be removed due to its functionality moved to future.
However the problem is that future contains also other improvements and we don't want the style to change with each black upgrade.
To Reproduce
Black configuration:
Code runned with black (note line is 125 lines long and too long and flake8 checking breaks):
Code runned with black (experimental-string-processing = true):
And run it with these arguments:
Expected behavior
I should get line no longer than 120 chars
Environment
The text was updated successfully, but these errors were encountered: