Occasionally we want to import a module, but only if the import of another module fails, using the same name. For example, this is a popular idiom when importing a module which has a native code version which is only available on some tergets:
try:
from themodule import TheClass
except:
from cThemodule import cTheClass as TheClass
Currently, lint warns about such cases, but it should be possible to recognize that this is valid, and not warn.
Occasionally we want to import a module, but only if the import of another module fails, using the same name. For example, this is a popular idiom when importing a module which has a native code version which is only available on some tergets:
try:
from themodule import TheClass
except:
from cThemodule import cTheClass as TheClass
Currently, lint warns about such cases, but it should be possible to recognize that this is valid, and not warn.