Module Expr Str ImportFrom alias alias alias ImportFrom alias Import alias Import alias Import alias Import alias Import alias Import alias ClassDef bases NameLoad body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Yield NameLoad Return For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body For NameStore NameLoad body If Call AttributeLoad NameLoad attr Str body Expr Yield Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr NameLoad Return AttributeLoad NameLoad attr decorator_list NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body With Call NameLoad NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad decorator_list NameLoad Assign NameStore ListLoad Str Str Str Str Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Call NameLoad SubscriptLoad NameLoad Index BinOpSub NameLoad Num Return Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body TryExcept body With Call NameLoad AttributeLoad NameLoad attr NameStore body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If NameLoad body Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr body Pass ExceptHandler type NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Expr Call NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num body Assign NameStore IfExp CompareGt BinOpSub NameLoad NameLoad Num BinOpSub NameLoad NameLoad Num Assign NameStore Str For TupleStore NameStore NameStore Call NameLoad SubscriptLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Slice NameLoad NameLoad body Expr Call NameLoad NameLoad BinOpAdd BinOpAdd NameLoad NameLoad Num NameLoad Expr Call NameLoad NameLoad Str BinOpMult Str BinOpAdd NameLoad Call NameLoad Call NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr If CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body For NameStore AttributeLoad NameLoad attr body Expr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body For NameStore AttributeLoad NameLoad attr body Expr Call NameLoad AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Continue If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore IfExp SubscriptLoad NameLoad Index Str Str IfExp SubscriptLoad NameLoad Index Str Str IfExp SubscriptLoad NameLoad Index Str Str NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign AttributeStore AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str If SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr If BoolOpOr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr NameLoad orelse If SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str attr NameLoad keyword NameLoad orelse For NameStore Call NameLoad Call NameLoad SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad NameLoad attr BoolOpOr SubscriptLoad NameLoad Index Str Str If SubscriptLoad NameLoad Index Str body Expr Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr orelse Expr Call NameLoad Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call NameLoad decorator_list If CompareEq NameLoad Str body Assign NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad
N/A N/A 
Sith attacks (and helps debugging) Jedi.

Randomly search Python files and run Jedi on it.  Exception and used
arguments are recorded to ``./record.json`` (specified by --record)::

    ./sith.py random /path/to/sourcecode

Redo recorded exception::

    ./sith.py redo

Show recorded exception::

    ./sith.py show

Run a specific operation

    ./sith.py run <operation> </path/to/source/file.py> <line> <col>

Where operation is one of completions, goto_assignments, goto_definitions,
usages, or call_signatures.

Note: Line numbers start at 1; columns start at 0 (this is consistent with
many text editors, including Emacs).

Usage:
  sith.py [--pdb|--ipdb|--pudb] [-d] [-n=<nr>] [-f] [--record=<file>] random [-s] [<path>]
  sith.py [--pdb|--ipdb|--pudb] [-d] [-f] [--record=<file>] redo
  sith.py [--pdb|--ipdb|--pudb] [-d] [-f] run <operation> <path> <line> <column>
  sith.py show [--record=<file>]
  sith.py -h | --help

Options:
  -h --help             Show this screen.
  --record=<file>       Exceptions are recorded in here [default: record.json].
  -f, --fs-cache        By default, file system cache is off for reproducibility.
  -n, --maxtries=<nr>   Maximum of random tries [default: 100]
  -d, --debug           Jedi print debugging when an error is raised.
  -s                    Shows the path/line numbers of every completion before it starts.
  --pdb                 Launch pdb when error is raised.
  --ipdb                Launch ipdb when error is raised.
  --pudb                Launch pudb when error is raised.
 __future__ print_function division unicode_literals docopt docopt N/A json N/A os N/A random N/A sys N/A traceback N/A jedi SourceFinder N/A object N/A N/A _files None fetch N/A N/A file_path N/A N/A N/A N/A N/A N/A N/A os path isdir file_path N/A N/A N/A file_path N/A N/A N/A root dirnames filenames N/A N/A os walk file_path N/A N/A name filenames N/A N/A N/A N/A name endswith .py N/A N/A N/A N/A N/A N/A os path join root name N/A staticmethod files N/A N/A cls file_path N/A N/A N/A N/A N/A cls _files None N/A N/A N/A cls _files N/A list N/A N/A cls fetch file_path N/A N/A cls _files N/A classmethod N/A TestCase N/A object N/A __init__ N/A N/A self operation path line column traceback N/A None N/A N/A N/A operation N/A self operations N/A N/A N/A ValueError N/A %s is not a valid operation operation N/A N/A self operation operation N/A N/A self path path N/A N/A self line line N/A N/A self column column N/A N/A self traceback traceback N/A from_cache N/A N/A cls record N/A N/A N/A N/A open record f N/A N/A args N/A N/A json load f N/A N/A cls args N/A classmethod N/A operations N/A completions goto_assignments goto_definitions usages call_signatures generate N/A N/A cls file_path N/A N/A N/A operation N/A N/A random choice N/A cls operations N/A path N/A N/A random choice N/A N/A SourceFinder files file_path N/A N/A open path f N/A N/A source N/A N/A f read N/A lines N/A N/A source splitlines N/A N/A lines N/A N/A lines N/A N/A line N/A N/A random randint 1 N/A len lines N/A column N/A N/A random randint 0 N/A len N/A lines N/A N/A line 1 N/A N/A cls operation path line column N/A classmethod run N/A N/A self debugger record print_result N/A None False N/A N/A N/A N/A N/A open N/A self path f N/A N/A N/A self script N/A N/A jedi Script N/A N/A f read N/A self line N/A self column N/A self path N/A N/A self objects N/A N/A getattr N/A self script N/A self operation N/A print_result N/A N/A N/A print N/A N/A {path}: Line {line} column {column} format N/A self __dict__ N/A N/A N/A self show_location N/A self line N/A self column N/A N/A N/A self show_operation N/A N/A N/A N/A jedi NotFoundError N/A N/A N/A N/A Exception N/A N/A N/A self traceback N/A N/A traceback format_exc N/A N/A record None N/A N/A call_args N/A N/A self operation N/A self path N/A self line N/A self column N/A self traceback N/A N/A open record w f N/A N/A N/A N/A json dump call_args f N/A N/A N/A self show_errors N/A debugger N/A N/A einfo N/A N/A sys exc_info N/A pdb N/A __import__ debugger N/A N/A debugger pudb N/A N/A N/A N/A pdb post_mortem N/A einfo N/A 2 N/A einfo N/A 0 N/A einfo N/A 1 N/A N/A N/A N/A pdb post_mortem N/A einfo N/A 2 N/A N/A exit 1 N/A show_location N/A N/A self lineno column show N/A 3 N/A N/A lower N/A N/A N/A lineno show 0 N/A lineno show 0 N/A prefix   | N/A N/A i line N/A enumerate N/A N/A N/A N/A N/A self script source split N/A lower lineno N/A N/A N/A print prefix N/A N/A lower i 1 line N/A N/A print prefix N/A N/A column N/A len N/A str lineno ^ N/A show_operation N/A N/A self N/A N/A N/A N/A print N/A %s:
 N/A N/A N/A self operation capitalize N/A N/A N/A self operation completions N/A N/A N/A N/A self show_completions N/A N/A N/A N/A self show_definitions N/A show_completions N/A N/A self N/A N/A N/A completion N/A self objects N/A N/A N/A print N/A completion name N/A show_definitions N/A N/A self N/A N/A N/A completion N/A self objects N/A N/A N/A print N/A completion desc_with_module N/A N/A N/A completion module_path None N/A N/A N/A N/A N/A N/A N/A os path abspath N/A completion module_path N/A N/A N/A os path abspath N/A self path N/A N/A N/A N/A self show_location N/A completion line N/A completion column N/A show_errors N/A N/A self N/A N/A N/A N/A print N/A self traceback N/A N/A print N/A N/A Error with running Script(...).{operation}() with
	path:   {path}
	line:   {line}
	column: {column} format N/A self __dict__ N/A N/A main N/A N/A arguments N/A N/A N/A debugger N/A N/A arguments N/A --pdb pdb N/A N/A arguments N/A --ipdb ipdb N/A N/A arguments N/A --pudb pudb None N/A record N/A arguments N/A --record N/A N/A N/A jedi settings use_filesystem_cache N/A arguments N/A --fs-cache N/A N/A arguments N/A --debug N/A N/A N/A N/A jedi set_debug_function N/A N/A N/A arguments N/A redo N/A arguments N/A show N/A N/A t N/A N/A TestCase from_cache record N/A N/A arguments N/A show N/A N/A N/A N/A t show_errors N/A N/A N/A N/A t run debugger N/A N/A N/A arguments N/A run N/A N/A N/A N/A N/A TestCase N/A arguments N/A <operation> N/A arguments N/A <path> N/A int N/A arguments N/A <line> N/A int N/A arguments N/A <column> run debugger print_result True N/A N/A _ N/A range N/A int N/A arguments N/A --maxtries N/A N/A t N/A N/A TestCase generate N/A N/A arguments N/A <path> . N/A N/A arguments N/A -s N/A N/A N/A print N/A %s %s %s %s  N/A N/A t operation N/A t path N/A t line N/A t column N/A N/A N/A N/A sys stdout flush N/A N/A N/A print . end N/A N/A N/A t run debugger record N/A N/A N/A N/A sys stdout flush N/A N/A print N/A N/A N/A __name__ __main__ N/A N/A arguments N/A docopt __doc__ N/A N/A main arguments