def f(x): try: from foo import StringIO except ImportError: raise return StringIO(x)
def f(x): try: from foo import <warning descr="'StringIO' in the try block with 'except ImportError' should also be defined in the except block">StringIO</warning> except ImportError: pass return StringIO(x)
def f(x): try: from lib1 import StringIO except ImportError: StringIO = lambda x: x return StringIO(x)
def f(x): from <error descr="Unresolved reference 'foo'">foo</error> import <error descr="Unresolved reference 'StringIO'">StringIO</error> return StringIO(x)