Module ImportFrom alias alias alias alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias identifier ImportFrom alias FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Assign NameStore IfExp CompareLt NameLoad TupleLoad Num Num Str Str Expr Call NameLoad BinOpMod Str NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr Str FunctionDef arguments args defaults body If CompareLt NameLoad TupleLoad Num body Assign NameStore Str orelse Assign NameStore Str Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr keyword ListLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr Str FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr Str FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str AttributeLoad NameLoad attr For NameStore ListLoad Str Str body Expr Call NameLoad Str keyword NameLoad Dict Str ListLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str AttributeLoad NameLoad attr decorator_list
N/A __future__ absolute_import division print_function unicode_literals sys version_info N/A pytest pies.overrides * frosted messages m utils flakes test_unusedImport N/A N/A N/A N/A N/A N/A flakes import fu, bar N/A m UnusedImport N/A m UnusedImport N/A N/A flakes from baz import fu, bar N/A m UnusedImport N/A m UnusedImport N/A test_aliasedImport N/A N/A N/A N/A N/A N/A flakes import fu as FU, bar as FU N/A m RedefinedWhileUnused N/A m UnusedImport N/A N/A flakes from moo import fu as FU, bar as FU N/A m RedefinedWhileUnused N/A m UnusedImport N/A test_usedImport N/A N/A N/A N/A N/A N/A flakes import fu; print(fu) N/A N/A flakes from baz import fu; print(fu) N/A N/A flakes import fu; del fu N/A test_redefinedWhileUnused N/A N/A N/A N/A N/A N/A flakes import fu; fu = 3 N/A m RedefinedWhileUnused N/A N/A flakes import fu; fu, bar = 3 N/A m RedefinedWhileUnused N/A N/A flakes import fu; [fu, bar] = 3 N/A m RedefinedWhileUnused N/A test_redefinedIf N/A N/A N/A N/A N/A Test that importing a module twice within an if block does raise a warning. N/A N/A flakes 
    i = 2
    if i==1:
        import os
        import os
    os.path N/A m RedefinedWhileUnused N/A test_redefinedIfElse N/A N/A N/A N/A N/A Test that importing a module twice in if and else blocks does not raise a warning. N/A N/A flakes 
    i = 2
    if i==1:
        import os
    else:
        import os
    os.path N/A test_redefinedTry N/A N/A N/A N/A N/A Test that importing a module twice in an try block does raise a warning. N/A N/A flakes 
    try:
        import os
        import os
    except Exception:
        pass
    os.path N/A m RedefinedWhileUnused N/A test_redefinedTryExcept N/A N/A N/A N/A N/A Test that importing a module twice in an try and except block does not raise a warning. N/A N/A flakes 
    try:
        import os
    except Exception:
        import os
    os.path N/A test_redefinedTryNested N/A N/A N/A N/A N/A Test that importing a module twice using a nested try/except and if blocks does not issue a warning. N/A N/A flakes 
    try:
        if True:
            if True:
                import os
    except Exception:
        import os
    os.path N/A test_redefinedTryExceptMulti N/A N/A N/A N/A N/A N/A flakes 
    try:
        from aa import mixer
    except AttributeError:
        from bb import mixer
    except RuntimeError:
        from cc import mixer
    except Exception:
        from dd import mixer
    mixer(123)
     N/A test_redefinedTryElse N/A N/A N/A N/A N/A N/A flakes 
    try:
        from aa import mixer
    except ImportError:
        pass
    else:
        from bb import mixer
    mixer(123)
     N/A m RedefinedWhileUnused N/A test_redefinedTryExceptElse N/A N/A N/A N/A N/A N/A flakes 
    try:
        import funca
    except ImportError:
        from bb import funca
        from bb import funcb
    else:
        from bbb import funcb
    print(funca, funcb)
     N/A test_redefinedTryExceptFinally N/A N/A N/A N/A N/A N/A flakes 
    try:
        from aa import a
    except ImportError:
        from bb import a
    finally:
        a = 42
    print(a)
     N/A test_redefinedTryExceptElseFinally N/A N/A N/A N/A N/A N/A flakes 
    try:
        import b
    except ImportError:
        b = Ellipsis
        from bb import a
    else:
        from aa import a
    finally:
        a = 42
    print(a, b)
     N/A test_redefinedByFunction N/A N/A N/A N/A N/A N/A flakes 
    import fu
    def fu():
        pass
     N/A m RedefinedWhileUnused N/A test_redefinedInNestedFunction N/A N/A N/A N/A N/A Test that shadowing a global name with a nested function definition generates a warning. N/A N/A flakes 
    import fu
    def bar():
        def baz():
            def fu():
                pass
     N/A m RedefinedWhileUnused N/A m UnusedImport N/A test_redefinedByClass N/A N/A N/A N/A N/A N/A flakes 
    import fu
    class fu:
        pass
     N/A m RedefinedWhileUnused N/A test_redefinedBySubclass N/A N/A N/A N/A N/A If an imported name is redefined by a class statement

    which also uses that name in the bases list, no warning is emitted.

     N/A N/A flakes 
    from fu import bar
    class bar(bar):
        pass
     N/A test_redefinedInClass N/A N/A N/A N/A N/A Test that shadowing a global with a class attribute does not produce a warning. N/A N/A flakes 
    import fu
    class bar:
        fu = 1
    print(fu)
     N/A test_usedInFunction N/A N/A N/A N/A N/A N/A flakes 
    import fu
    def fun():
        print(fu)
     N/A test_shadowedByParameter N/A N/A N/A N/A N/A N/A flakes 
    import fu
    def fun(fu):
        print(fu)
     N/A m UnusedImport N/A N/A flakes 
    import fu
    def fun(fu):
        print(fu)
    print(fu)
     N/A test_newAssignment N/A N/A N/A N/A N/A N/A flakes fu = None N/A test_usedInGetattr N/A N/A N/A N/A N/A N/A flakes import fu; fu.bar.baz N/A N/A flakes import fu; "bar".fu.baz N/A m UnusedImport N/A test_usedInSlice N/A N/A N/A N/A N/A N/A flakes import fu; print(fu.bar[1:]) N/A test_usedInIfBody N/A N/A N/A N/A N/A N/A flakes 
    import fu
    if True: print(fu)
     N/A test_usedInIfConditional N/A N/A N/A N/A N/A N/A flakes 
    import fu
    if fu: pass
     N/A test_usedInElifConditional N/A N/A N/A N/A N/A N/A flakes 
    import fu
    if False: pass
    elif fu: pass
     N/A test_usedInElse N/A N/A N/A N/A N/A N/A flakes 
    import fu
    if False: pass
    else: print(fu)
     N/A test_usedInCall N/A N/A N/A N/A N/A N/A flakes import fu; fu.bar() N/A test_usedInClass N/A N/A N/A N/A N/A N/A flakes 
    import fu
    class bar:
        bar = fu
     N/A test_usedInClassBase N/A N/A N/A N/A N/A N/A flakes 
    import fu
    class bar(object, fu.baz):
        pass
     N/A test_notUsedInNestedScope N/A N/A N/A N/A N/A N/A flakes 
    import fu
    def bleh():
        pass
    print(fu)
     N/A test_usedInFor N/A N/A N/A N/A N/A N/A flakes 
    import fu
    for bar in range(9):
        print(fu)
     N/A test_usedInForElse N/A N/A N/A N/A N/A N/A flakes 
    import fu
    for bar in range(10):
        pass
    else:
        print(fu)
     N/A test_redefinedByFor N/A N/A N/A N/A N/A N/A flakes 
    import fu
    for fu in range(2):
        pass
     N/A m RedefinedWhileUnused N/A test_shadowedByFor N/A N/A N/A N/A N/A Test that shadowing a global name with a for loop variable generates a warning. N/A N/A flakes 
    import fu
    fu.bar()
    for fu in ():
        pass
     N/A m ImportShadowedByLoopVar N/A test_shadowedByForDeep N/A N/A N/A N/A N/A Test that shadowing a global name with a for loop variable nested in a tuple unpack generates a warning. N/A N/A flakes 
    import fu
    fu.bar()
    for (x, y, z, (a, b, c, (fu,))) in ():
        pass
     N/A m ImportShadowedByLoopVar N/A test_usedInReturn N/A N/A N/A N/A N/A N/A flakes 
    import fu
    def fun():
        return fu
     N/A test_usedInOperators N/A N/A N/A N/A N/A N/A flakes import fu; 3 + fu.bar N/A N/A flakes import fu; 3 % fu.bar N/A N/A flakes import fu; 3 - fu.bar N/A N/A flakes import fu; 3 * fu.bar N/A N/A flakes import fu; 3 ** fu.bar N/A N/A flakes import fu; 3 / fu.bar N/A N/A flakes import fu; 3 // fu.bar N/A N/A flakes import fu; -fu.bar N/A N/A flakes import fu; ~fu.bar N/A N/A flakes import fu; 1 == fu.bar N/A N/A flakes import fu; 1 | fu.bar N/A N/A flakes import fu; 1 & fu.bar N/A N/A flakes import fu; 1 ^ fu.bar N/A N/A flakes import fu; 1 >> fu.bar N/A N/A flakes import fu; 1 << fu.bar N/A test_usedInAssert N/A N/A N/A N/A N/A N/A flakes import fu; assert fu.bar N/A test_usedInSubscript N/A N/A N/A N/A N/A N/A flakes import fu; fu.bar[1] N/A test_usedInLogic N/A N/A N/A N/A N/A N/A flakes import fu; fu and False N/A N/A flakes import fu; fu or False N/A N/A flakes import fu; not fu.bar N/A test_usedInList N/A N/A N/A N/A N/A N/A flakes import fu; [fu] N/A test_usedInTuple N/A N/A N/A N/A N/A N/A flakes import fu; (fu,) N/A test_usedInTry N/A N/A N/A N/A N/A N/A flakes 
    import fu
    try: fu
    except Exception: pass
     N/A test_usedInExcept N/A N/A N/A N/A N/A N/A flakes 
    import fu
    try: fu
    except Exception: pass
     N/A test_redefinedByExcept N/A N/A N/A N/A N/A as_exc N/A N/A version_info N/A 2 6 ,   as  N/A N/A flakes N/A 
    import fu
    try: pass
    except Exception%sfu: pass
     as_exc N/A m RedefinedWhileUnused N/A test_usedInRaise N/A N/A N/A N/A N/A N/A flakes 
    import fu
    raise fu.bar
     N/A test_usedInYield N/A N/A N/A N/A N/A N/A flakes 
    import fu
    def gen():
        yield fu
     N/A test_usedInDict N/A N/A N/A N/A N/A N/A flakes import fu; {fu:None} N/A N/A flakes import fu; {1:fu} N/A test_usedInParameterDefault N/A N/A N/A N/A N/A N/A flakes 
    import fu
    def f(bar=fu):
        pass
     N/A test_usedInAttributeAssign N/A N/A N/A N/A N/A N/A flakes import fu; fu.bar = 1 N/A test_usedInKeywordArg N/A N/A N/A N/A N/A N/A flakes import fu; fu.bar(stuff=fu) N/A test_usedInAssignment N/A N/A N/A N/A N/A N/A flakes import fu; bar=fu N/A N/A flakes import fu; n=0; n+=fu N/A test_usedInListComp N/A N/A N/A N/A N/A N/A flakes import fu; [fu for _ in range(1)] N/A N/A flakes import fu; [1 for _ in range(1) if fu] N/A test_redefinedByListComp N/A N/A N/A N/A N/A N/A flakes import fu; [1 for fu in range(1)] N/A m RedefinedWhileUnused N/A test_usedInTryFinally N/A N/A N/A N/A N/A N/A flakes 
    import fu
    try: pass
    finally: fu
     N/A N/A flakes 
    import fu
    try: fu
    finally: pass
     N/A test_usedInWhile N/A N/A N/A N/A N/A N/A flakes 
    import fu
    while 0:
        fu
     N/A N/A flakes 
    import fu
    while fu: pass
     N/A test_usedInGlobal N/A N/A N/A N/A N/A N/A flakes 
    import fu
    def f(): global fu
     N/A m UnusedImport N/A test_usedInBackquote N/A N/A N/A N/A N/A N/A flakes import fu; `fu` N/A N/A N/A N/A pytest mark skipif version_info >= (3,) test_usedInExec N/A N/A N/A N/A N/A N/A version_info N/A 3 N/A N/A exec_stmt exec "print 1" in fu.bar N/A N/A exec_stmt exec("print(1)", fu.bar) N/A N/A flakes N/A import fu; %s exec_stmt N/A test_usedInLambda N/A N/A N/A N/A N/A N/A flakes import fu; lambda: fu N/A test_shadowedByLambda N/A N/A N/A N/A N/A N/A flakes import fu; lambda fu: fu N/A m UnusedImport N/A test_usedInSliceObj N/A N/A N/A N/A N/A N/A flakes import fu; "meow"[::fu] N/A test_unusedInNestedScope N/A N/A N/A N/A N/A N/A flakes 
    def bar():
        import fu
    fu
     N/A m UnusedImport N/A m UndefinedName N/A test_methodsDontUseClassScope N/A N/A N/A N/A N/A N/A flakes 
    class bar:
        import fu
        def fun():
            fu
     N/A m UnusedImport N/A m UndefinedName N/A test_nestedFunctionsNestScope N/A N/A N/A N/A N/A N/A flakes 
    def a():
        def b():
            fu
        import fu
     N/A test_nestedClassAndFunctionScope N/A N/A N/A N/A N/A N/A flakes 
    def a():
        import fu
        class b:
            def c():
                print(fu)
     N/A test_importStar N/A N/A N/A N/A N/A N/A flakes from fu import * N/A m ImportStarUsed ignore_frosted_errors N/A N/A test_packageImport N/A N/A N/A N/A N/A If a dotted name is imported and used, no warning is reported. N/A N/A flakes 
    import fu.bar
    fu.bar
     N/A test_unusedPackageImport N/A N/A N/A N/A N/A If a dotted name is imported and not used, an unused import warning is reported. N/A N/A flakes import fu.bar N/A m UnusedImport N/A test_duplicateSubmoduleImport N/A N/A N/A N/A N/A If a submodule of a package is imported twice, an unused

    import warning and a redefined while unused warning are reported.

     N/A N/A flakes 
    import fu.bar, fu.bar
    fu.bar
     N/A m RedefinedWhileUnused N/A N/A flakes 
    import fu.bar
    import fu.bar
    fu.bar
     N/A m RedefinedWhileUnused N/A test_differentSubmoduleImport N/A N/A N/A N/A N/A If two different submodules of a package are imported,

    no duplicate import warning is reported for the package.

     N/A N/A flakes 
    import fu.bar, fu.baz
    fu.bar, fu.baz
     N/A N/A flakes 
    import fu.bar
    import fu.baz
    fu.bar, fu.baz
     N/A test_assignRHSFirst N/A N/A N/A N/A N/A N/A flakes import fu; fu = fu N/A N/A flakes import fu; fu, bar = fu N/A N/A flakes import fu; [fu, bar] = fu N/A N/A flakes import fu; fu += fu N/A test_tryingMultipleImports N/A N/A N/A N/A N/A N/A flakes 
    try:
        import fu
    except ImportError:
        import bar as fu
    fu
     N/A test_nonGlobalDoesNotRedefine N/A N/A N/A N/A N/A N/A flakes 
    import fu
    def a():
        fu = 3
        return fu
    fu
     N/A test_functionsRunLater N/A N/A N/A N/A N/A N/A flakes 
    def a():
        fu
    import fu
     N/A test_functionNamesAreBoundNow N/A N/A N/A N/A N/A N/A flakes 
    import fu
    def fu():
        fu
    fu
     N/A m RedefinedWhileUnused N/A test_ignoreNonImportRedefinitions N/A N/A N/A N/A N/A N/A flakes a = 1; a = 2 N/A test_importingForImportError N/A N/A N/A N/A N/A N/A flakes 
    try:
        import fu
    except ImportError:
        pass
     N/A N/A N/A N/A pytest mark skipif 'todo' test_importedInClass N/A N/A N/A N/A N/A Imports in class scope can be used through. N/A N/A flakes 
    class c:
        import i
        def __init__():
            i
     N/A N/A N/A N/A pytest mark skipif 'todo: requires evaluating attribute access' test_futureImport N/A N/A N/A N/A N/A __future__ is special. N/A N/A flakes from __future__ import division N/A N/A flakes 
    "docstring is allowed before future import"
    from __future__ import division
     N/A test_futureImportFirst N/A N/A N/A N/A N/A __future__ imports must come before anything else. N/A N/A flakes 
    x = 5
    from __future__ import division
     N/A m LateFutureImport N/A N/A flakes 
    from foo import bar
    from __future__ import division
    bar
     N/A m LateFutureImport N/A test_ignoredInFunction N/A N/A N/A N/A N/A An C{__all__} definition does not suppress unused import warnings in a function scope. N/A N/A flakes 
    def foo():
        import bar
        __all__ = ["bar"]
     N/A m UnusedImport N/A m UnusedVariable N/A test_ignoredInClass N/A N/A N/A N/A N/A An C{__all__} definition does not suppress unused import warnings in a class scope. N/A N/A flakes 
    class foo:
        import bar
        __all__ = ["bar"]
     N/A m UnusedImport N/A test_warningSuppressed N/A N/A N/A N/A N/A If a name is imported and unused but is named in C{__all__}, no warning is reported. N/A N/A flakes 
    import foo
    __all__ = ["foo"]
     N/A test_unrecognizable N/A N/A N/A N/A N/A If C{__all__} is defined in a way that can't be recognized statically, it is ignored. N/A N/A flakes 
    import foo
    __all__ = ["f" + "oo"]
     N/A m UnusedImport N/A N/A flakes 
    import foo
    __all__ = [] + ["foo"]
     N/A m UnusedImport N/A test_unboundExported N/A N/A N/A N/A N/A If C{__all__} includes a name which is not bound, a warning is emitted. N/A N/A flakes 
    __all__ = ["foo"]
     N/A m UndefinedExport N/A filename N/A foo/__init__.py __init__.py N/A N/A N/A flakes 
        __all__ = ["foo"]
         filename filename N/A ignore_frosted_errors_for___init__.py N/A E101 E103 N/A test_importStarExported N/A N/A N/A N/A N/A Do not report undefined if import * is used N/A N/A flakes 
    from foolib import *
    __all__ = ["foo"]
     N/A m ImportStarUsed N/A test_usedInGenExp N/A N/A N/A N/A N/A Using a global in a generator expression results in no warnings. N/A N/A flakes import fu; (fu for _ in range(1)) N/A N/A flakes import fu; (1 for _ in range(1) if fu) N/A test_redefinedByGenExp N/A N/A N/A N/A N/A  Re-using a global name as the loop variable for a generator

    expression results in a redefinition warning.

     N/A N/A flakes import fu; (1 for fu in range(1)) N/A m RedefinedWhileUnused N/A m UnusedImport N/A test_usedAsDecorator N/A N/A N/A N/A N/A Using a global name in a decorator statement results in no warnings, but

    using an undefined name in a decorator statement results in an undefined
    name warning.

     N/A N/A flakes 
    from interior import decorate
    @decorate
    def f():
        return "hello"
     N/A N/A flakes 
    from interior import decorate
    @decorate('value')
    def f():
        return "hello"
     N/A N/A flakes 
    @decorate
    def f():
        return "hello"
     N/A m UndefinedName N/A test_usedAsClassDecorator N/A N/A N/A N/A N/A Using an imported name as a class decorator results in no warnings

    but using an undefined name as a class decorator results in an undefined name warning.

     N/A N/A flakes 
    from interior import decorate
    @decorate
    class foo:
        pass
     N/A N/A flakes 
    from interior import decorate
    @decorate("foo")
    class bar:
        pass
     N/A N/A flakes 
    @decorate
    class foo:
        pass
     N/A m UndefinedName N/A