pyment icon indicating copy to clipboard operation
pyment copied to clipboard

Google indentation is set to 2 spaces

Open apuignav opened this issue 9 years ago • 4 comments

Hi,

first of all, congratulations for the amazing tool!

I have seen that converting to google format the indentation is explicitly set to 2 spaces. If I look at the latest Google Style Guide ( http://google-styleguide.googlecode.com/svn/trunk/pyguide.html?showone=Comments#Comments), I see the examples are set in 4 spaces (I think that's the recommended one). Could this be made somehow configurable? Right now I've patched it to add 4 spaces, but I understand there is a rationale behind explicitly setting them to 2...

apuignav avatar Aug 04 '15 16:08 apuignav

Hi,

Thanks for your report. Indeed, I think it should bebetter to make it configurable. I'll do that asap.

dadadel avatar Aug 15 '15 07:08 dadadel

Hi,

this seems to still be the issue, original link from @apuignav does not work, but according to this example Google Style Python Docstrings should be indented with 4 spaces, moreover flake8 also requires this. The number of spaces for indentation is not configurable but is hardcoded https://github.com/dadadel/pyment/blob/master/pyment/docstring.py#L1968.

zitkat avatar Nov 01 '21 12:11 zitkat

@dadadel @zitkat I've opened a pr to make this value configurable as well as a few other minor fixes

nyoungstudios avatar Jan 18 '22 19:01 nyoungstudios

@nyoungstudios thank you, your solution seems nicer and more principled. I will test it when I have some spare time.

zitkat avatar Feb 12 '22 11:02 zitkat