Skip to content
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

Support django translation and python-brace-format #27

Open
sshishov opened this issue Aug 11, 2022 · 1 comment
Open

Support django translation and python-brace-format #27

sshishov opened this issue Aug 11, 2022 · 1 comment

Comments

@sshishov
Copy link

Before you request a new feature, please confirm:
[+] I have read through README and understand how the plugin works currently.
[+] I understand that this project is not actively adding new features, and there are no promises if/when my request will be implemented.
[+] (Optional) I am interested in working to add this feature through a PR.

What would you like to see added to this plugin?
I would like to add the support for the django translations which uses python-brace-format

What is your rationale/ use case for this feature?
Currently it is producing false-positive result and adding noqa all over the places is not a great solution. Disabling the error in the plugin is not also the proper way of doing as sometimes it is pointing out to the developer that he forgot to add the f prefix for the string.

What alternative solutions have you considered? Why do you prefer the solution you proposed?
There is no solution except just disabling FS003 error

Additional relevant information:
Example of the usage

from django.utils.translation import gettext

value = gettext('some string with {param} here').format(param=param)

It is needed to support lazy translation the string with parameter, do not like the current solution which is using % (old) format syntax.

@MichaelKim0407
Copy link
Owner

Thanks for making this suggestion.

Could you please explain what you would like implemented? It looks to me that you described a case where this plugin doesn't work well, but didn't specify how you want it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants