jedi-vim icon indicating copy to clipboard operation
jedi-vim copied to clipboard

Completion broken because of identation

Open sacre opened this issue 13 years ago • 3 comments

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 :(

sacre avatar Oct 28 '13 18:10 sacre

Apart from "this is ugly and you shouldn't do that", this is a bug :-)

davidhalter avatar Oct 29 '13 04:10 davidhalter

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

derenio avatar Dec 10 '13 16:12 derenio

Seems to work now - latest Jedi dev branch.

davidhalter avatar Mar 30 '15 23:03 davidhalter