Skip to content
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

Wrong indentation when using method_docstring_numpy. #349

Open
yanghaoxie opened this issue Oct 26, 2019 · 6 comments
Open

Wrong indentation when using method_docstring_numpy. #349

yanghaoxie opened this issue Oct 26, 2019 · 6 comments
Labels
seen PR was seen and initial feedback was given

Comments

@yanghaoxie
Copy link

I am using Emacs 27.05. and I have

(setq python-indent-offset 4 
      python-indent-guess-indent-offset t)
  • When I expand method_docstring_numpy, I get
    def foo(self, a, b, c):
        """
        
Parameters
----------
a : 

b : 

c : 


Returns
-------
out : 

        """
        

You see that the Parameters and Returns did not indent right.

  • However, method_docstring expand right.
    def bar(self, a, b, c):
        """
        Keyword Arguments:
        a -- 
        b -- 
        c -- 
        """

@npostavs
Copy link
Contributor

Works for me, I get

def foo(self, a, b, c):
    """
    
    Parameters
    ----------
    a : 

    b : 

    c : 


    Returns
    -------
    out : 

    """
    

@JCZuurmond
Copy link

Can anyone tell me which settings they have to fix this? My indentation is off for both cases, I guess I am missing some setting.

@AndreaCrotti
Copy link
Owner

Mm I just tried as well and it works for me, and my Emacs configuration is just https://github.com/AndreaCrotti/Emacs-configuration/blob/master/ca-init.el
@JCZuurmond
Maybe you have some setting that affects this somehow?

@AndreaCrotti AndreaCrotti added the seen PR was seen and initial feedback was given label Jul 28, 2021
@JCZuurmond
Copy link

@AndreaCrotti : Could you be a bit more precise in pointing out which configuration settings should effect this? I do not see any off:

(setq python-indent-offset 4 
      python-indent-guess-indent-offset t

@AndreaCrotti
Copy link
Owner

Yeah that was the point @JCZuurmond I don't have any custom config at all now since I don't really use Python.
So if you have a link to your config I guess it's probably something in your config that's affecting it.

@JCZuurmond
Copy link

You can find it here. Thanks for helping, @AndreaCrotti!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
seen PR was seen and initial feedback was given
Projects
None yet
Development

No branches or pull requests

4 participants