Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix jedi SAFE mode #3176

Merged
merged 2 commits into from
Dec 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions py/server/deephaven_internal/auto_completer/_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,15 @@ def do_completion(

# run jedi
txt = self.get_doc(uri)
# The Script completer is static analysis only, so we should actually be feeding it a whole document at once.

completer = Script if self.__mode == Mode.SAFE else Interpreter
completer = (
# The Script completer is static analysis only, so we should actually be feeding it a whole document at once.
Script(txt)
if self.__mode == Mode.SAFE
else Interpreter(txt, [self.__scope])
)
completions = completer.complete(line, col)

completions = completer(txt, [self.__scope]).complete(line, col)
# for now, a simple sorting based on number of preceding _
# we may want to apply additional sorting to each list before combining
results: list = []
Expand Down