I've got a Python project using PyDev in Eclipse, and PyDev keeps generating false errors for my code. I have a module settings
that defines a settings
object. I import that in module b
and assign an attribute with:
from settings import settings
settings.main = object()
In some of my code--but not all of it, statements like:
from settings import settings
print settings.main
... generate "Undefined variable from import: main" messages in the Eclipse code error pane, even though the code runs without a problem. How can I correct these?