yasnippet-snippets
yasnippet-snippets copied to clipboard
Wrong indentation when using `method_docstring_numpy`.
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 --
"""
Works for me, I get
def foo(self, a, b, c):
"""
Parameters
----------
a :
b :
c :
Returns
-------
out :
"""
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.
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 : 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
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.
You can find it here. Thanks for helping, @AndreaCrotti!