mirror of https://github.com/astral-sh/ruff
[`flake8-gettext`] Swap `format-` and `printf-in-get-text-func-call` examples (`INT002`, `INT003`) (#16769)
Summary -- Fixes #16735. I also checked `INT001`, and it correctly has an f-string example. Test Plan -- None
This commit is contained in:
parent
23ccb52fa6
commit
b2e0ae6416
|
|
@ -27,7 +27,7 @@ use crate::checkers::ast::Checker;
|
|||
/// from gettext import gettext as _
|
||||
///
|
||||
/// name = "Maria"
|
||||
/// _("Hello, %s!" % name) # Looks for "Hello, Maria!".
|
||||
/// _("Hello, {}!".format(name)) # Looks for "Hello, Maria!".
|
||||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ use ruff_text_size::Ranged;
|
|||
/// from gettext import gettext as _
|
||||
///
|
||||
/// name = "Maria"
|
||||
/// _("Hello, {}!".format(name)) # Looks for "Hello, Maria!".
|
||||
/// _("Hello, %s!" % name) # Looks for "Hello, Maria!".
|
||||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
|
|
|
|||
Loading…
Reference in New Issue