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

Better argument validation for python *gettext functions #1002

Open
tomasr8 opened this issue May 1, 2023 · 0 comments
Open

Better argument validation for python *gettext functions #1002

tomasr8 opened this issue May 1, 2023 · 0 comments

Comments

@tomasr8
Copy link
Contributor

tomasr8 commented May 1, 2023

Overview Description

*gettext calls should be properly validated for the correct number/type of arguments and an error/warning should be issued if the signature does not match.

Some examples which currently produce po file entries w/o any errors/warnings:

gettext(some_arg="hello") - gettext takes only one positional argument
gettext("hello", "asdad") - same for this
ngettext("asd", "sdfsdfsd") - missing n argument

These should either be errors or at least warnings as they will result in runtime errors.

Additional Information

babel version 2.12.1

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

No branches or pull requests

2 participants