Skip to content

bad indent with cython #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jiajunhuang opened this issue Jan 16, 2017 · 2 comments
Closed

bad indent with cython #66

jiajunhuang opened this issue Jan 16, 2017 · 2 comments

Comments

@jiajunhuang
Copy link

cdef void foo(
        i
)

but not

cdef void foo(
    i
)
@blueyed
Copy link
Member

blueyed commented Jan 16, 2017

/cc @anntzer (via #48)

@anntzer
Copy link
Contributor

anntzer commented Jan 16, 2017

This is not different from regular python indents, which this plugin also sets to

def foo(
        i
): ...

(i.e., 8 spaces) in order to avoid having the same indent as the block below.

Now it is correct that Cython has both the form with a final colon (as in Python) and without (i.e., a function declaration, similar to typehint stub files), but when the indent is made we don't know yet what the user is going to do, so defaulting to 8 spaces seems good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants