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?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Joril's avatar
114
Joril
asked 5 years ago
Wingware Support's avatar
4.3k
Wingware Support
updated 5 years ago

Comments

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Wingware Support's avatar
4.3k
Wingware Support
answered 5 years ago
link

Comments

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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)