Import a secondary file in spyder IDE with star import with no warnings
By : nilus
Date : March 29 2020, 07:55 AM
I wish did fix the issue. Spyder uses pyflakes under the hood for the real-time code analysis in the editor pane. Pyflakes doesn't have the capability to interpret wildcard import statements (i.e. it won't retrieve all the names that are actually imported by a wildcard import). Hence the warning messages about undefined names that you're getting. I would recommend to avoid wildcard imports altogether in your code files. Though wildcard imports are valid python code, they are widely considered a bad practice in most situations (see here and here for more detailed explanation). If you replace from common_functions import * with for example import common_functions as cf, then the prefix that you have to use is minimal in length.