对于某些情况,Jedi在sublime文本中自动完成失败:
import os
def x(y):
print(y)
print(x)
f = open('1.txt', mode='r', encoding='utf-8'). # fail on dot
from datetime import d # fail on module import
我在这两种情况下都遇到了这个错误:
...
File "/Users/rmerkushin/Library/Application Support/Sublime Text 3/Packages/sublime-jedi/jedi/parser/__init__.py", line 267, in parse
root_node = super(ParserWithRecovery, self).parse(self._tokenize(tokenizer))
File "/Users/rmerkushin/Library/Application Support/Sublime Text 3/Packages/sublime-jedi/jedi/parser/__init__.py", line 146, in parse
self.remove_last_newline()
File "/Users/rmerkushin/Library/Application Support/Sublime Text 3/Packages/sublime-jedi/jedi/parser/__init__.py", line 227, in remove_last_newline
assert newline.value.endswith('\n')
AssertionError
如何解决此问题?
P.S。:jedi版本 - 0.10.0,Sublime Text - 3126(Python 3.3.6)