forked from astral-sh/ruff
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…astral-sh#10118) ## Summary It is a convention to use the `_()` alias for `gettext()`. We want to avoid statement expressions and assignments related to aliases of the gettext API. See https://docs.python.org/3/library/gettext.html for details. When one uses `_() to mark a string for translation, the tools look for these markers and replace the original string with its translated counterpart. If the string contains variable placeholders or formatting, it can complicate the translation process, lead to errors or incorrect translations. ## Test Plan * Test file `RUF027_1.py` was extended such that the test reproduces the false-positive Closes astral-sh#10023. --------- Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters