jedi-vim
jedi-vim copied to clipboard
Completion broken because of identation
jedi taken from pypi
this is ok
class Foo(object):
def bar(self,
baz
): # <--------------- problem
pass
def test():
foo = Foo()
foo.ba
import jedi
assert jedi.Script(open('t.py').read(), 10, 10).completions()
but this is not:
class Foo(object):
def bar(self,
baz
): # <--------------- problem
pass
def test():
foo = Foo()
foo.ba
import jedi
assert jedi.Script(open('t.py').read(), 10, 10).completions()
and raises AssertionError because there isn't completions for baz :(
Apart from "this is ugly and you shouldn't do that", this is a bug :-)
Lets not play on emotions or IMO'ism and instead point to the relevant pep's section:
http://www.python.org/dev/peps/pep-0008/#indentation
Seems to work now - latest Jedi dev branch.