mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 10:48:32 +00:00
[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
2 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue