For code in your project, the only way is adding a comment saying that you expected that (the static code-analysis only sees what you see, not runtime info -- if you opened that module yourself, you'd have no indication that main was expected).
You can use ctrl+1 (Cmd+1 for Mac) in a line with an error and pydev will present you an option to add a comment to ignore that error.
If it was some external module, you could add it to the forced builtins so that it was forced to be analyzed by a running shell with runtime information (see http://pydev.org/manual_101_interpreter.html for details).