First time here? Check out the FAQ!
1

Code warnings, gettext and "Undefined name: _"

I have a program that uses gettext and has a lot of _("string") constructs. Since I define my _ translator function once using __builtin__._, WingIDE thinks the symbol is undefined everywhere I use it and adds a "Undefined name: _" to the Code warnings. Is there a way to tell WingIDE to stop worrying about _ in every file?

Joril's avatar
104
Joril
asked 2019-06-19 10:00:50 -0500
Wingware Support's avatar
4.1k
Wingware Support
updated 2019-06-19 10:03:55 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

Yes, you can go to the Code Warnings tool to click away one instance of the warning and then go to the Configuration tab and right-click to edit the rule that ignores _ and change Specific Scope to Any File.

Wingware Support's avatar
4.1k
Wingware Support
answered 2019-06-19 10:07:51 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer