Skip to content

Commit

Permalink
Adapt to new sexpdata (0.0.1.dev2; No String)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Oct 18, 2012
1 parent 6794d26 commit bd39dd2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions jediepcserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@


def complete(source, line, column, source_path):
source = source.value()
source_path = source_path.value()
script = jedi.Script(source, line, column, source_path)
script = jedi.Script(source, line, column, source_path or '')

This comment has been minimized.

Copy link
@davidhalter

davidhalter Oct 18, 2012

how does that happen? not having a source_path? just be careful with that, because I use the source_path for caching (you're just using implementation details here).

This comment has been minimized.

Copy link
@tkf

tkf Oct 18, 2012

Author Owner

Thanks for the advice! It was just a quick workaround. When buffer is not accessing to a file, source_path is going to be undefined. Actually it will be [], converted from Emacs lisp nil, so I need to give some hashable but meaningless value.

BTW, can source_path be optional for small source? How about source_path=None meaning "do not cache". For example it will be useful when using with IPython Notebook (https://github.com/tkf/emacs-ipython-notebook), as there is no actual Python file when writing code in the notebook.

This comment has been minimized.

Copy link
@tkf

tkf Oct 19, 2012

Author Owner

I posted a feature request davidhalter/jedi#32

reply = []
for comp in script.complete():
reply.append(dict(
Expand Down

0 comments on commit bd39dd2

Please sign in to comment.