metakirby5 / codi.vim

:notebook_with_decorative_cover: The interactive scratchpad for hackers.
MIT License
3k stars 83 forks source link

Python IndentationError when class method has decorator #114

Open MarcelRobitaille opened 4 years ago

MarcelRobitaille commented 4 years ago

Copying the sample code from the fix in e2aa007 and adding a decorator to the class method results in an IndentationError. My code is now as follows:

from unittest.mock import patch

class Test(object):

    def __init__(self):
        pass

    @patch()
    def an_empty_line_above_this(self):

        return 'No worry about the blank lines'

if __name__ == '__main__':

    print('blank lines are cool, now PEP8 lint stop warning about it’s absence.')

And I get the following errors: image

Here is a minimal vimrc that will reproduce the issue:

call plug#begin('~/.vim/plugged')
Plug 'metakirby5/codi.vim'
call plug#end()

Environment

metakirby5 commented 4 years ago

@heshiyou Any thoughts?

iamgodot commented 1 year ago

Are we having expectation on this fix?