pyment
pyment copied to clipboard
Google indentation is set to 2 spaces
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...
Hi,
Thanks for your report. Indeed, I think it should bebetter to make it configurable. I'll do that asap.
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.
@dadadel @zitkat I've opened a pr to make this value configurable as well as a few other minor fixes
@nyoungstudios thank you, your solution seems nicer and more principled. I will test it when I have some spare time.