Skip to content

Commit

Permalink
Keep completer, Colin suggestion. move comment closer to script. blac…
Browse files Browse the repository at this point in the history
…k fmt
  • Loading branch information
devinrsmith committed Dec 12, 2022
1 parent 3d2c57c commit dee6701
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions py/server/deephaven_internal/auto_completer/_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,13 @@ 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.
if jedi_settings.mode == Mode.SAFE:
completions = Script(txt).complete(line, col)
else:
completions = Interpreter(txt, [self.__scope]).complete(line, col)
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)

# for now, a simple sorting based on number of preceding _
# we may want to apply additional sorting to each list before combining
Expand Down

0 comments on commit dee6701

Please sign in to comment.