Module Import alias alias alias ImportFrom alias alias Import alias Import alias identifier Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore ListLoad Assign NameStore Str Assign NameStore NameLoad For NameStore Call NameLoad Call NameLoad NameLoad body If CompareEq NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad If NameLoad body Assign NameStore NameLoad AugAssignAdd NameStore SubscriptLoad NameLoad Index NameLoad orelse If CompareEq SubscriptLoad NameLoad Index NameLoad Str body Assign NameStore NameLoad AugAssignAdd NameStore SubscriptLoad NameLoad Index NameLoad orelse If Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr body If CompareGt Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str orelse If CompareIn SubscriptLoad NameLoad Index NameLoad Str body If CompareGt Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad If CompareEq NameLoad NameLoad body AugAssignAdd NameStore Num orelse AugAssignAdd NameStore SubscriptLoad NameLoad Index NameLoad If CompareGt Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad orelse If Call AttributeLoad SubscriptLoad NameLoad Index Num attr body Expr Call AttributeLoad NameLoad attr Str If CompareEq NameLoad Call NameLoad NameLoad body Assign NameStore BinOpSub Call NameLoad NameLoad Num Return TupleLoad Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad Assign NameStore ListLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Index Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd Str NameLoad Str Dict decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str Str Str NameLoad For NameStore TupleLoad Str Str Str Str body If CompareIn NameLoad AttributeLoad NameLoad attr body Delete SubscriptDel AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Str body Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str IfExp NameLoad NameLoad Call NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str ListLoad Str Str Str Expr Call AttributeLoad NameLoad attr Str ListLoad Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str ListLoad Str Str Str Str Expr Call AttributeLoad NameLoad attr Str ListLoad Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str ListLoad Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str ListLoad Str Expr Call AttributeLoad NameLoad attr Str ListLoad Str Expr Call AttributeLoad NameLoad attr Str ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias Expr Call AttributeLoad NameLoad attr CompareGt Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Dict Str Str Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr keyword Dict Str Str Str Str keyword Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Index Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Delete SubscriptDel AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str decorator_list Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body With Call NameLoad keyword Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TryFinally body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str finalbody Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A os unittest subprocess tempfile NamedTemporaryFile mkdtemp N/A dxpy N/A dxpy_testutil testutil N/A IFS split_line_like_bash N/A N/A line point N/A N/A N/A 
    :returns: comp_words, comp_cword

    Split the line like bash would, and then put it back together with
    IFS, and calculate cword while you're at it.

    Use os.environ['COMP_POINT'] to figure out which word we're in
     N/A point N/A int point N/A cwords N/A N/A current_word N/A append_to_current_word False N/A pos N/A range N/A len line N/A N/A N/A pos point N/A N/A cword N/A len cwords N/A append_to_current_word N/A N/A append_to_current_word False N/A current_word N/A line N/A pos N/A N/A N/A N/A line N/A pos \ N/A N/A append_to_current_word True N/A current_word N/A line N/A pos N/A N/A N/A N/A N/A line N/A pos isspace N/A N/A N/A N/A len current_word 0 N/A N/A N/A N/A cwords append current_word N/A current_word N/A N/A N/A N/A line N/A pos [<>=:] N/A N/A N/A N/A len current_word 0 N/A N/A N/A N/A cwords append current_word N/A current_word N/A N/A N/A cwords append N/A line N/A pos N/A N/A pos point N/A N/A cword 1 N/A N/A current_word N/A line N/A pos N/A N/A N/A len current_word 0 N/A N/A N/A N/A cwords append current_word N/A N/A N/A N/A N/A line N/A -1 isspace N/A N/A N/A N/A cwords append N/A N/A point N/A len line N/A N/A cword N/A N/A len cwords 1 N/A N/A N/A N/A IFS join cwords N/A str cword N/A TestDXTabCompletion N/A N/A unittest TestCase N/A N/A project_id None N/A ids_to_destroy N/A setUpClass N/A N/A cls N/A N/A N/A N/A cls project_id N/A N/A N/A N/A dxpy api project_new N/A name tab-completion project N/A id N/A classmethod tearDownClass N/A N/A cls N/A N/A N/A N/A N/A N/A dxpy api project_destroy N/A cls project_id N/A entity_id N/A cls ids_to_destroy N/A N/A N/A N/A dxpy DXHTTPRequest N/A N/A / entity_id /destroy N/A N/A classmethod setUp N/A N/A self N/A N/A N/A N/A N/A os environ N/A IFS IFS N/A N/A N/A os environ N/A _ARGCOMPLETE 1 N/A N/A N/A os environ N/A _DX_ARC_DEBUG 1 N/A N/A N/A os environ N/A COMP_WORDBREAKS "'@><=;|&(: N/A N/A N/A os environ N/A DX_PROJECT_CONTEXT_ID N/A self project_id N/A N/A N/A dxpy set_workspace_id N/A self project_id N/A tearDown N/A N/A self N/A N/A N/A N/A N/A N/A dxpy api project_remove_folder N/A self project_id N/A folder recurse / True N/A var N/A IFS _ARGCOMPLETE _DX_ARC_DEBUG COMP_WORDBREAKS N/A N/A N/A var N/A os environ N/A N/A N/A N/A os environ N/A var N/A get_bash_completions N/A N/A self line point stderr_contains N/A None N/A N/A N/A N/A os environ N/A COMP_LINE line N/A N/A N/A os environ N/A COMP_POINT N/A point point N/A str N/A len line N/A p N/A N/A subprocess Popen dx stdout N/A subprocess PIPE stderr N/A subprocess PIPE N/A N/A out err N/A N/A p communicate N/A N/A N/A self assertIn stderr_contains err N/A N/A N/A out split IFS N/A assert_completion N/A N/A self line completion N/A N/A N/A N/A N/A self assertIn completion N/A N/A self get_bash_completions line N/A assert_completions N/A N/A self line completions N/A N/A N/A actual_completions N/A N/A self get_bash_completions line N/A completion completions N/A N/A N/A N/A self assertIn completion actual_completions N/A assert_non_completion N/A N/A self line non_completion N/A N/A N/A N/A N/A self assertNotIn non_completion N/A N/A self get_bash_completions line N/A assert_no_completions N/A N/A self line stderr_contains N/A N/A N/A N/A N/A self assertEqual N/A N/A self get_bash_completions line stderr_contains stderr_contains N/A N/A test_command_completion N/A N/A self N/A N/A N/A N/A N/A self assert_completion dx ru run  N/A N/A N/A self assert_completion dx run run  N/A N/A N/A self assert_completions dx l N/A login logout ls N/A N/A N/A self assert_completions dx  N/A login logout cp N/A test_subcommand_completion N/A N/A self N/A N/A N/A N/A N/A self assert_completions dx find  N/A apps data jobs projects N/A N/A N/A self assert_completions dx new    N/A project record workflow N/A test_option_completion N/A N/A self N/A N/A N/A N/A N/A self assert_completions dx - N/A -h --help --env-help N/A test_folder_completion N/A N/A self N/A N/A N/A dxproj N/A N/A dxpy DXProject N/A N/A N/A dxproj new_folder /foo/bar parents True N/A N/A N/A self assert_completions dx ls  N/A foo/ N/A N/A N/A self assert_completions dx ls fo N/A foo/ N/A N/A N/A self assert_completions dx ls foo/ N/A foo/bar/ N/A test_category_completion N/A N/A self N/A N/A dxpy.app_categories APP_CATEGORIES N/A N/A N/A self assertTrue N/A N/A len APP_CATEGORIES 0 N/A N/A N/A self assert_completions dx find apps --category  APP_CATEGORIES N/A test_applet_completion N/A N/A self N/A N/A N/A dxapplet N/A N/A dxpy DXApplet N/A N/A N/A dxapplet new runSpec N/A code interpreter placeholder bash dxapi 1.0.0 name my applet N/A N/A N/A self assert_completion dx ls my my applet  N/A N/A N/A self assert_completion dx ls ls  N/A N/A N/A self assert_completion dx run my my applet  N/A N/A N/A self assert_completion dx ls  my applet  N/A N/A N/A dxapplet new runSpec N/A code interpreter placeholder bash dxapi 1.0.0 name hidden hidden True N/A N/A N/A self assert_completion dx ls hid hidden  N/A N/A N/A self assert_no_completions dx run hid N/A test_workflow_completion N/A N/A self N/A N/A N/A dxworkflow N/A N/A dxpy new_dxworkflow name my workflow N/A N/A N/A self assert_completion dx run my my workflow  N/A N/A N/A dxworkflow hide N/A N/A N/A self assert_no_completions dx run my N/A test_project_completion N/A N/A self N/A N/A N/A N/A N/A N/A self ids_to_destroy append N/A N/A N/A N/A dxpy api project_new N/A name to select N/A id N/A N/A N/A self assert_completion dx select to to select\: N/A N/A N/A self assert_completion dx select "to "to select: N/A N/A N/A self assert_completion dx select to\ select: N/A test_completion_with_bad_current_project N/A N/A self N/A N/A N/A N/A N/A os environ N/A DX_PROJECT_CONTEXT_ID N/A N/A N/A dxpy set_workspace_id N/A N/A N/A self assert_completion dx select  tab-completion project\: N/A N/A N/A self assert_completion dx cd ta tab-completion project\: N/A test_completion_with_no_current_project N/A N/A self N/A N/A N/A N/A N/A dxpy config N/A DX_PROJECT_CONTEXT_ID N/A N/A N/A N/A dxpy config save N/A N/A N/A self assert_completion dx select  tab-completion project\: N/A N/A N/A self assert_completion dx cd ta tab-completion project\: N/A N/A N/A unittest skipUnless N/A testutil TEST_ENV skipping test that would clobber your local environment test_local_file_completion N/A N/A self N/A N/A N/A N/A NamedTemporaryFile dir N/A N/A os getcwd local_file N/A N/A N/A N/A self assert_completion dx upload  N/A N/A N/A os path basename N/A local_file name N/A test_local_dir_completion N/A N/A self N/A N/A N/A old_cwd N/A N/A os getcwd N/A tempdir N/A mkdtemp N/A N/A N/A os chdir tempdir N/A N/A N/A N/A N/A os makedirs subdir/subsubdir N/A N/A N/A self assert_completion dx upload  subdir/ N/A N/A N/A self assert_completion dx build  subdir/ N/A N/A N/A N/A os chdir old_cwd N/A test_noninterference_of_local_files N/A N/A self N/A N/A N/A N/A N/A self assert_no_completions dx ls  N/A N/A N/A self assert_no_completions dx ls noninter N/A N/A N/A self assert_no_completions dx ls : N/A test_escaping N/A N/A self N/A N/A N/A r N/A N/A dxpy new_dxrecord name my <<awesome.>> record !@#$%^&*(){}[]|;:?` N/A N/A N/A self assert_completion dx ls my my \<\<awesome.\>\> record \!\@#$%^\&*\(\){}[]\|\;\\:?\`  N/A N/A N/A self assert_completion dx ls "my "my <<awesome.>> record \!@#\$%^&*(){}[]|;\:?\` N/A N/A N/A self assert_completion dx ls 'my 'my <<awesome.>> record !@#$%^&*(){}[]|;\:?` N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main