Ask Your Question
1

Code warnings, gettext and "Undefined name: _"

asked 2019-06-19 10:00:50 -0500

Joril gravatar image

updated 2019-06-19 10:03:55 -0500

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-06-19 10:07:51 -0500

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-06-19 10:00:50 -0500

Seen: 145 times

Last updated: Jun 19