Derived from the flake8-gettext linter.
What it does#
Checks for f-strings in
gettext function calls.
Why is this bad?#
gettext API, the
gettext function (often aliased to
a translation of its input argument by looking it up in a translation
gettext with an f-string as its argument can cause unexpected
behavior. Since the f-string is resolved before the function call, the
translation catalog will look up the formatted string, rather than the
Instead, format the value returned by the function call, rather than its argument.