[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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user