mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +00:00

## Summary Django's `gettext` doesn't support f-strings, so we should avoid translating `.format` calls in those cases. Closes https://github.com/astral-sh/ruff/issues/7891.
9 lines
243 B
Python
9 lines
243 B
Python
from django.utils.translation import gettext
|
|
|
|
long = 'long'
|
|
split_to = 'split_to'
|
|
gettext(
|
|
'some super {} and complicated string so that the error code '
|
|
'E501 Triggers when this is not {} multi-line'.format(
|
|
long, split_to)
|
|
)
|