run_autocomplete.diff is a preliminary patch for moving the completion list function into run.py and reversing the imports. However, the assert in test_autocomplete, line 103 newly fails because the call to open_completions in autocomplete_event (line 85) returns None. The None comes from l. 155.
comp_lists = self.fetch_completions(comp_what, mode)
if not comp_lists[0]:
return None
I do not yet know why moving the one function causes the completion lists for re to be blank. I am going to shelve this approach and return to deletion.