Minor refactor for jedi completions