Module Expr Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias If CompareLt AttributeLoad NameLoad attr TupleLoad Num body ImportFrom alias orelse ImportFrom alias Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str Assign TupleStore NameStore AttributeStore NameLoad attr TupleLoad AttributeLoad NameLoad attr NameLoad TryFinally body Return Call NameLoad NameLoad NameLoad finalbody Assign AttributeStore NameLoad attr NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults Num body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Str Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Str NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults vararg body Assert NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad ListLoad AttributeLoad NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad ListLoad AttributeLoad NameLoad attr ListLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad ListLoad AttributeLoad NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad ListLoad AttributeLoad NameLoad attr Call NameLoad ListLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad ListLoad NameLoad NameLoad Call NameLoad ListLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad ListLoad NameLoad ListLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Str Num Num Str Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Str Num NameLoad Str Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore ListLoad Str Str Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Str Num BinOpAdd Call NameLoad SubscriptLoad NameLoad Index Num Num Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd Str SubscriptLoad NameLoad Index Num Str Str Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Str Call NameLoad Num Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If UnaryOpNot Call NameLoad NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad Call AttributeLoad NameLoad attr TupleLoad Call NameLoad NameLoad Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias identifier Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad ListLoad TupleLoad Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str FunctionDef arguments args NameParam defaults body Exec NameLoad decorator_list TryExcept body Expr Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad AttributeLoad NameLoad attr attr Str Num orelse Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad BinOpMod Str TupleLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad BinOpMod Str TupleLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore IfExp CompareGtE AttributeLoad NameLoad attr TupleLoad Num Num Str Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore IfExp CompareGtE AttributeLoad NameLoad attr TupleLoad Num Num Str Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str If CompareLt NameLoad TupleLoad Num body Assign NameStore BinOpMod Str TupleLoad NameLoad orelse Assign NameStore IfExp CompareGtE NameLoad TupleLoad Num Num Str Str Assign NameStore IfExp BoolOpOr CompareGtE NameLoad TupleLoad Num Num Num CompareLtELt TupleLoad Num Num Num NameLoad TupleLoad Num Num Num Num Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad ListLoad TupleLoad Str NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad ListLoad TupleLoad Str Call NameLoad Call NameLoad NameLoad Call NameLoad Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Num Assign NameStore Call AttributeLoad BinOpMod Str NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad BinOpMod Str TupleLoad NameLoad decorator_list Call NameLoad CompareGtE AttributeLoad NameLoad attr TupleLoad Num Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Num Assign NameStore Call AttributeLoad BinOpMod Str NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad BinOpMod Str TupleLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Str Expr Call AttributeLoad NameLoad attr Assign NameStore ListLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad ListLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad ListLoad TupleLoad Str Call NameLoad Call NameLoad NameLoad Call NameLoad Num Str TupleLoad Str Call NameLoad Call NameLoad NameLoad Call NameLoad Num Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Import alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore ListLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If CompareGtE AttributeLoad NameLoad attr TupleLoad Num body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad Str Str Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Call NameLoad Num Str Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad BinOpMod Str NameLoad Str Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad Str NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad keyword Call AttributeLoad Str attr Str Assign NameStore Call NameLoad Str Call NameLoad Num Str Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad BinOpMod Str NameLoad Str Num decorator_list decorator_list
N/A N/A 
Tests for L{pyflakes.scripts.pyflakes}.
 N/A os N/A sys N/A shutil N/A subprocess N/A tempfile pyflakes.messages UnusedImport pyflakes.reporter Reporter pyflakes.api checkPath checkRecursive iterSourceCode pyflakes.test.harness TestCase skipIf N/A N/A N/A sys version_info N/A 3 N/A cStringIO StringIO N/A io StringIO N/A unichr chr withStderrTo N/A N/A stderr f N/A args kwargs N/A N/A 
    Call C{f} with C{sys.stderr} redirected to C{stderr}.
     N/A N/A outer N/A sys stderr N/A N/A sys stderr stderr N/A N/A N/A N/A f args kwargs N/A N/A N/A sys stderr outer N/A Node N/A object N/A N/A 
    Mock an AST node.
     __init__ N/A N/A self lineno col_offset N/A 0 N/A N/A N/A self lineno lineno N/A N/A self col_offset col_offset N/A N/A LoggingReporter N/A object N/A N/A 
    Implementation of Reporter that just appends any error to a list.
     __init__ N/A N/A self log N/A N/A N/A 
        Construct a C{LoggingReporter}.

        @param log: A list to append log messages to.
         N/A N/A self log log N/A flake N/A N/A self message N/A N/A N/A N/A N/A N/A self log append N/A flake N/A str message N/A unexpectedError N/A N/A self filename message N/A N/A N/A N/A N/A N/A self log append N/A unexpectedError filename message N/A syntaxError N/A N/A self filename msg lineno offset line N/A N/A N/A N/A N/A N/A self log append N/A syntaxError filename msg lineno offset line N/A N/A TestIterSourceCode N/A TestCase N/A N/A 
    Tests for L{iterSourceCode}.
     setUp N/A N/A self N/A N/A N/A N/A self tempdir N/A N/A tempfile mkdtemp N/A tearDown N/A N/A self N/A N/A N/A N/A N/A shutil rmtree N/A self tempdir N/A makeEmptyFile N/A N/A self N/A parts N/A N/A parts N/A fpath N/A N/A N/A os path join N/A self tempdir parts N/A fd N/A open fpath a N/A N/A N/A fd close N/A fpath N/A test_emptyDirectory N/A N/A self N/A N/A N/A 
        There are no Python files in an empty directory.
         N/A N/A N/A self assertEqual N/A list N/A iterSourceCode N/A N/A self tempdir N/A N/A test_singleFile N/A N/A self N/A N/A N/A 
        If the directory contains one Python file, C{iterSourceCode} will find
        it.
         N/A childpath N/A N/A self makeEmptyFile foo.py N/A N/A N/A self assertEqual N/A list N/A iterSourceCode N/A N/A self tempdir N/A childpath N/A test_onlyPythonSource N/A N/A self N/A N/A N/A 
        Files that are not Python source files are not included.
         N/A N/A N/A self makeEmptyFile foo.pyc N/A N/A N/A self assertEqual N/A list N/A iterSourceCode N/A N/A self tempdir N/A N/A test_recurses N/A N/A self N/A N/A N/A 
        If the Python files are hidden deep down in child directories, we will
        find them.
         N/A N/A N/A os mkdir N/A N/A N/A os path join N/A self tempdir foo N/A apath N/A N/A self makeEmptyFile foo a.py N/A N/A N/A os mkdir N/A N/A N/A os path join N/A self tempdir bar N/A bpath N/A N/A self makeEmptyFile bar b.py N/A cpath N/A N/A self makeEmptyFile c.py N/A N/A N/A self assertEqual N/A sorted N/A iterSourceCode N/A N/A self tempdir N/A sorted N/A apath bpath cpath N/A test_multipleDirectories N/A N/A self N/A N/A N/A 
        L{iterSourceCode} can be given multiple directories.  It will recurse
        into each of them.
         N/A foopath N/A N/A N/A os path join N/A self tempdir foo N/A barpath N/A N/A N/A os path join N/A self tempdir bar N/A N/A N/A os mkdir foopath N/A apath N/A N/A self makeEmptyFile foo a.py N/A N/A N/A os mkdir barpath N/A bpath N/A N/A self makeEmptyFile bar b.py N/A N/A N/A self assertEqual N/A sorted N/A iterSourceCode N/A foopath barpath N/A sorted N/A apath bpath N/A test_explicitFiles N/A N/A self N/A N/A N/A 
        If one of the paths given to L{iterSourceCode} is not a directory but
        a file, it will include that in its output.
         N/A epath N/A N/A self makeEmptyFile e.py N/A N/A N/A self assertEqual N/A list N/A iterSourceCode N/A epath N/A epath N/A N/A TestReporter N/A TestCase N/A N/A 
    Tests for L{Reporter}.
     test_syntaxError N/A N/A self N/A N/A N/A 
        C{syntaxError} reports that there was a syntax error in the source
        file.  It reports to the error stream and includes the filename, line
        number, error message, actual line of source and a caret pointing to
        where the error is.
         N/A err N/A StringIO N/A reporter N/A Reporter None err N/A N/A N/A reporter syntaxError foo.py a problem 3 4 bad line of source N/A N/A N/A self assertEqual foo.py:3: a problem
bad line of source
     ^
 N/A N/A err getvalue N/A test_syntaxErrorNoOffset N/A N/A self N/A N/A N/A 
        C{syntaxError} doesn't include a caret pointing to the error if
        C{offset} is passed as C{None}.
         N/A err N/A StringIO N/A reporter N/A Reporter None err N/A N/A N/A reporter syntaxError foo.py a problem 3 None bad line of source N/A N/A N/A self assertEqual foo.py:3: a problem
bad line of source
 N/A N/A err getvalue N/A test_multiLineSyntaxError N/A N/A self N/A N/A N/A 
        If there's a multi-line syntax error, then we only report the last
        line.  The offset is adjusted so that it is relative to the start of
        the last line.
         N/A err N/A StringIO N/A lines N/A bad line of source more bad lines of source N/A reporter N/A Reporter None err N/A N/A N/A reporter syntaxError foo.py a problem 3 N/A N/A len N/A lines N/A 0 5 N/A N/A join lines N/A N/A N/A self assertEqual N/A N/A N/A foo.py:3: a problem
 N/A lines N/A -1      ^
 N/A N/A err getvalue N/A test_unexpectedError N/A N/A self N/A N/A N/A 
        C{unexpectedError} reports an error processing a source file.
         N/A err N/A StringIO N/A reporter N/A Reporter None err N/A N/A N/A reporter unexpectedError source.py error message N/A N/A N/A self assertEqual source.py: error message
 N/A N/A err getvalue N/A test_flake N/A N/A self N/A N/A N/A 
        C{flake} reports a code warning from Pyflakes.  It is exactly the
        str() of a L{pyflakes.messages.Message}.
         N/A out N/A StringIO N/A reporter N/A Reporter out None N/A message N/A UnusedImport foo.py N/A Node 42 bar N/A N/A N/A reporter flake message N/A N/A N/A self assertEqual N/A N/A out getvalue N/A %s
 N/A message N/A N/A CheckTests N/A TestCase N/A N/A 
    Tests for L{check} and L{checkPath} which check a file for flakes.
     makeTempFile N/A N/A self content N/A N/A N/A 
        Make a temporary file containing C{content} and return a path to it.
         N/A N/A _ fpath N/A N/A tempfile mkstemp N/A N/A N/A hasattr content decode N/A N/A content N/A N/A content encode ascii N/A fd N/A open fpath wb N/A N/A N/A fd write content N/A N/A N/A fd close N/A fpath N/A assertHasErrors N/A N/A self path errorList N/A N/A N/A 
        Assert that C{path} causes errors.

        @param path: A path to a file to check.
        @param errorList: A list of errors expected to be printed to stderr.
         N/A err N/A StringIO N/A count N/A withStderrTo err checkPath path N/A N/A N/A self assertEqual N/A count N/A N/A err getvalue N/A N/A len errorList N/A N/A join errorList N/A getErrors N/A N/A self path N/A N/A N/A 
        Get any warnings or errors reported by pyflakes for the file at C{path}.

        @param path: The path to a Python file on disk that pyflakes will check.
        @return: C{(count, log)}, where C{count} is the number of warnings or
            errors generated, and log is a list of those warnings, presented
            as structured data.  See L{LoggingReporter} for more details.
         N/A log N/A N/A reporter N/A LoggingReporter log N/A count N/A checkPath path reporter N/A N/A count log N/A test_legacyScript N/A N/A self N/A N/A pyflakes.scripts pyflakes script_pyflakes N/A N/A N/A self assertIs N/A script_pyflakes checkPath checkPath N/A test_missingTrailingNewline N/A N/A self N/A N/A N/A 
        Source which doesn't end with a newline shouldn't cause any
        exception to be raised nor an error indicator to be returned by
        L{check}.
         N/A fName N/A N/A self makeTempFile def foo():
	pass
	 N/A N/A N/A self assertHasErrors fName N/A N/A test_checkPathNonExisting N/A N/A self N/A N/A N/A 
        L{checkPath} handles non-existing files.
         N/A N/A count errors N/A N/A self getErrors extremo N/A N/A N/A self assertEqual count 1 N/A N/A N/A self assertEqual errors N/A N/A unexpectedError extremo No such file or directory N/A test_multilineSyntaxError N/A N/A self N/A N/A N/A 
        Source which includes a syntax error which results in the raised
        L{SyntaxError.text} containing multiple lines of source are reported
        with only the last line of that source.
         N/A source def foo():
    '''

def bar():
    pass

def baz():
    '''quux'''
 evaluate N/A N/A source N/A N/A N/A source N/A N/A N/A N/A N/A evaluate source N/A N/A N/A SyntaxError N/A N/A e N/A N/A N/A sys exc_info N/A 1 N/A N/A N/A self assertTrue N/A N/A N/A N/A e text count 1 N/A N/A N/A N/A self fail N/A sourcePath N/A N/A self makeTempFile source N/A N/A N/A self assertHasErrors sourcePath N/A N/A %s:8: invalid syntax
    '''quux'''
           ^
 N/A sourcePath N/A test_eofSyntaxError N/A N/A self N/A N/A N/A 
        The error reported for source files which end prematurely causing a
        syntax error reflects the cause for the syntax error.
         N/A sourcePath N/A N/A self makeTempFile def foo( N/A N/A N/A self assertHasErrors sourcePath N/A N/A %s:1: unexpected EOF while parsing
def foo(
         ^
 N/A sourcePath N/A test_nonDefaultFollowsDefaultSyntaxError N/A N/A self N/A N/A N/A 
        Source which has a non-default argument following a default argument
        should include the line number of the syntax error.  However these
        exceptions do not include an offset.
         N/A source def foo(bar=baz, bax):
    pass
 N/A sourcePath N/A N/A self makeTempFile source N/A last_line N/A N/A N/A sys version_info N/A 3 2         ^
 N/A N/A N/A self assertHasErrors sourcePath N/A N/A %s:1: non-default argument follows default argument
def foo(bar=baz, bax):
%s N/A sourcePath last_line N/A test_nonKeywordAfterKeywordSyntaxError N/A N/A self N/A N/A N/A 
        Source which has a non-keyword argument after a keyword argument should
        include the line number of the syntax error.  However these exceptions
        do not include an offset.
         N/A source foo(bar=baz, bax)
 N/A sourcePath N/A N/A self makeTempFile source N/A last_line N/A N/A N/A sys version_info N/A 3 2              ^
 N/A N/A N/A self assertHasErrors sourcePath N/A N/A %s:1: non-keyword arg after keyword arg
foo(bar=baz, bax)
%s N/A sourcePath last_line N/A test_invalidEscape N/A N/A self N/A N/A N/A 
        The invalid escape syntax raises ValueError in Python 2
         N/A ver N/A sys version_info N/A sourcePath N/A N/A self makeTempFile foo = '\xyz' N/A N/A ver N/A 3 N/A N/A decoding_error N/A %s: problem decoding source
 N/A sourcePath N/A N/A last_line N/A N/A ver N/A 3 2        ^
 N/A col N/A N/A N/A ver N/A 3 3 1 N/A N/A 3 2 4 ver N/A 3 3 1 2 N/A decoding_error N/A %s:1: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-%d: truncated \xXX escape
foo = '\xyz'
%s N/A sourcePath col last_line N/A N/A N/A self assertHasErrors sourcePath N/A decoding_error N/A test_permissionDenied N/A N/A self N/A N/A N/A 
        If the source file is not readable, this is reported on standard
        error.
         N/A sourcePath N/A N/A self makeTempFile N/A N/A N/A os chmod sourcePath 0 N/A N/A count errors N/A N/A self getErrors sourcePath N/A N/A N/A self assertEqual count 1 N/A N/A N/A self assertEqual errors N/A N/A unexpectedError sourcePath Permission denied N/A test_pyflakesWarning N/A N/A self N/A N/A N/A 
        If the source file has a pyflakes warning, this is reported as a
        'flake'.
         N/A sourcePath N/A N/A self makeTempFile import foo N/A N/A count errors N/A N/A self getErrors sourcePath N/A N/A N/A self assertEqual count 1 N/A N/A N/A self assertEqual errors N/A N/A flake N/A str N/A UnusedImport sourcePath N/A Node 1 foo N/A test_misencodedFileUTF8 N/A N/A self N/A N/A N/A 
        If a source file contains bytes which cannot be decoded, this is
        reported on stderr.
         N/A SNOWMAN N/A unichr 9731 N/A source N/A N/A N/A # coding: ascii
x = "%s"
 SNOWMAN encode utf-8 N/A sourcePath N/A N/A self makeTempFile source N/A N/A N/A self assertHasErrors sourcePath N/A N/A %s: problem decoding source
 N/A sourcePath N/A N/A skipIf N/A N/A sys version_info N/A 3 not relevant test_misencodedFileUTF16 N/A N/A self N/A N/A N/A 
        If a source file contains bytes which cannot be decoded, this is
        reported on stderr.
         N/A SNOWMAN N/A unichr 9731 N/A source N/A N/A N/A # coding: ascii
x = "%s"
 SNOWMAN encode utf-16 N/A sourcePath N/A N/A self makeTempFile source N/A N/A N/A self assertHasErrors sourcePath N/A N/A %s: problem decoding source
 N/A sourcePath N/A test_checkRecursive N/A N/A self N/A N/A N/A 
        L{checkRecursive} descends into each directory, finding Python files
        and reporting problems.
         N/A tempdir N/A N/A tempfile mkdtemp N/A N/A N/A os mkdir N/A N/A N/A os path join tempdir foo N/A file1 N/A N/A N/A os path join tempdir foo bar.py N/A fd N/A open file1 wb N/A N/A N/A fd write N/A N/A import baz
 encode ascii N/A N/A N/A fd close N/A file2 N/A N/A N/A os path join tempdir baz.py N/A fd N/A open file2 wb N/A N/A N/A fd write N/A N/A import contraband encode ascii N/A N/A N/A fd close N/A log N/A N/A reporter N/A LoggingReporter log N/A warnings N/A checkRecursive N/A tempdir reporter N/A N/A N/A self assertEqual warnings 2 N/A N/A N/A self assertEqual N/A sorted log N/A sorted N/A N/A flake N/A str N/A UnusedImport file1 N/A Node 1 baz N/A flake N/A str N/A UnusedImport file2 N/A Node 1 contraband N/A N/A IntegrationTests N/A TestCase N/A N/A 
    Tests of the pyflakes script that actually spawn the script.
     setUp N/A N/A self N/A N/A N/A N/A self tempdir N/A N/A tempfile mkdtemp N/A N/A self tempfilepath N/A N/A N/A os path join N/A self tempdir temp N/A tearDown N/A N/A self N/A N/A N/A N/A N/A shutil rmtree N/A self tempdir N/A getPyflakesBinary N/A N/A self N/A N/A N/A 
        Return the path to the pyflakes binary.
         N/A pyflakes N/A package_dir N/A N/A N/A os path dirname N/A pyflakes __file__ N/A N/A N/A N/A os path join package_dir .. bin pyflakes N/A runPyflakes N/A N/A self paths stdin N/A None N/A N/A 
        Launch a subprocess running C{pyflakes}.

        @param args: Command-line arguments to pass to pyflakes.
        @param kwargs: Options passed on to C{subprocess.Popen}.
        @return: C{(returncode, stdout, stderr)} of the completed pyflakes
            process.
         N/A env N/A dict N/A os environ N/A N/A env N/A PYTHONPATH N/A N/A N/A os pathsep join N/A sys path N/A command N/A N/A sys executable N/A N/A self getPyflakesBinary N/A N/A N/A command extend paths N/A stdin N/A N/A p N/A N/A subprocess Popen command env env stdin N/A subprocess PIPE stdout N/A subprocess PIPE stderr N/A subprocess PIPE N/A N/A stdout stderr N/A N/A p communicate stdin N/A N/A p N/A N/A subprocess Popen command env env stdout N/A subprocess PIPE stderr N/A subprocess PIPE N/A N/A stdout stderr N/A N/A p communicate N/A rv N/A N/A p wait N/A N/A N/A sys version_info N/A 3 N/A N/A stdout N/A N/A stdout decode utf-8 N/A stderr N/A N/A stderr decode utf-8 N/A N/A stdout stderr rv N/A test_goodFile N/A N/A self N/A N/A N/A 
        When a Python source file is all good, the return code is zero and no
        messages are printed to either stdout or stderr.
         N/A fd N/A open N/A self tempfilepath a N/A N/A N/A fd close N/A d N/A N/A self runPyflakes N/A N/A self tempfilepath N/A N/A N/A self assertEqual d N/A 0 N/A test_fileWithFlakes N/A N/A self N/A N/A N/A 
        When a Python source file has warnings, the return code is non-zero
        and the warnings are printed to stdout.
         N/A fd N/A open N/A self tempfilepath wb N/A N/A N/A fd write N/A N/A import contraband
 encode ascii N/A N/A N/A fd close N/A d N/A N/A self runPyflakes N/A N/A self tempfilepath N/A expected N/A UnusedImport N/A self tempfilepath N/A Node 1 contraband N/A N/A N/A self assertEqual d N/A N/A %s
 expected 1 N/A test_errors N/A N/A self N/A N/A N/A 
        When pyflakes finds errors with the files it's given, (if they don't
        exist, say), then the return code is non-zero and the errors are
        printed to stderr.
         N/A d N/A N/A self runPyflakes N/A N/A self tempfilepath N/A error_msg N/A %s: No such file or directory
 N/A N/A self tempfilepath N/A N/A N/A self assertEqual d N/A error_msg 1 N/A test_readFromStdin N/A N/A self N/A N/A N/A 
        If no arguments are passed to C{pyflakes} then it reads from stdin.
         N/A d N/A N/A self runPyflakes N/A stdin N/A N/A import contraband encode ascii N/A expected N/A UnusedImport <stdin> N/A Node 1 contraband N/A N/A N/A self assertEqual d N/A N/A %s
 expected 1 N/A N/A