Skip to content

Commit

Permalink
fix: lazyasd path removed
Browse files Browse the repository at this point in the history
  • Loading branch information
jnoortheen committed Jul 4, 2024
1 parent 4b0fde6 commit 998270f
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions xontrib/jedi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,21 @@
import os

from xonsh.built_ins import XSH
from xonsh.completers import _aliases
from xonsh.completers import completer
from xonsh.completers.tools import (
RichCompletion,
contextual_completer,
get_filter_function,
)
from xonsh.lazyasd import lazyobject

from xonsh.parsers.completion_context import CompletionContext

__all__ = ()

import jedi


@lazyobject
def XONSH_SPECIAL_TOKENS():
return {
XONSH_SPECIAL_TOKENS = {
"?",
"??",
"$(",
Expand All @@ -35,9 +33,7 @@ def XONSH_SPECIAL_TOKENS():
}


@lazyobject
def XONSH_SPECIAL_TOKENS_FIRST():
return {tok[0] for tok in XONSH_SPECIAL_TOKENS}
XONSH_SPECIAL_TOKENS_FIRST = {tok[0] for tok in XONSH_SPECIAL_TOKENS}


@contextual_completer
Expand Down Expand Up @@ -145,5 +141,5 @@ def create_completion(comp: jedi.api.classes.Completion):


# Jedi ignores leading '@(' and friends
_aliases._add_one_completer("jedi_python", complete_jedi, "<python")
_aliases._remove_completer(["python"])
completer.add_one_completer("jedi_python", complete_jedi, "<python")
completer.remove_completer("python")

0 comments on commit 998270f

Please sign in to comment.