-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SWAP flake8-gettext (INT) #16735
Comments
Nice catch! If I'm parsing the results on the playground right, it looks like the examples in the documentation are swapped and the implementations are correct. |
I haven't started working on it. @p1-dta feel free to go ahead if you're interested, or we can put the help wanted label on. I am happy to work on it if nobody else does, though. |
I think this is bad enough that we should fix it ourselves, unless @p1-dta is interested |
I'll keep it in my inbox and check back later today. |
examples (`INT002`, `INT003`) Summary -- Fixes #16735. Test Plan -- None
Hi, I'm back, sorry for being late, I don't use GH on a daily basis, so I missed the notification. |
Summary
Two rules documentation seems to be swapped:
Expected detection:
_("Hello, {}!".format(name)) # Looks for "Hello, Maria!".
_("Hello, %s!" % name) # Looks for "Hello, Maria!".
Actual documentation:
_("Hello, %s!" % name) # Looks for "Hello, Maria!".
_("Hello, {}!".format(name)) # Looks for "Hello, Maria!".
I wonder if this is intended.
I didn't checked if the rule INT002 actually detect str.format or printf style, but in any case, there is an inconsistency somewhere.
The text was updated successfully, but these errors were encountered: