The formatter currently never adds parentheses around strings in the right hand side of an assignment. Black does add them if they help to match the line limit, otherwise it doesn't.
Input and identical ruff formatted output:
DEFAULT_FILE_STORAGE_DEPRECATED_MSG = "The DEFAULT_FILE_STORAGE setting is deprecated. Use STORAGES instead."
DEFAULT_FILE_STORAGE_DEPRECATED_MSG = "The DEFAULT_FILE_STORAGE setting is deprecated. Use STORAGES instead. This makes it so long that parentheses don't help"
Black formatted output:
DEFAULT_FILE_STORAGE_DEPRECATED_MSG = (
"The DEFAULT_FILE_STORAGE setting is deprecated. Use STORAGES instead."
)
DEFAULT_FILE_STORAGE_DEPRECATED_MSG = "The DEFAULT_FILE_STORAGE setting is deprecated. Use STORAGES instead. This makes it so long that parentheses don't help"
The formatter currently never adds parentheses around strings in the right hand side of an assignment. Black does add them if they help to match the line limit, otherwise it doesn't.
Input and identical ruff formatted output:
Black formatted output: