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

Feature request: consider supporting 2-spaces-indentation #5

Closed
wq2012 opened this issue Jan 22, 2019 · 3 comments

Comments

2 participants
@wq2012
Copy link
Contributor

commented Jan 22, 2019

Expected Behavior

Some python libraries use 2-spaces-indentation instead of 4 spaces or single tab.

The user would expect being able to use an argument to support that.

Actual Behavior

Currently no argument seems to support that.

And by default it will generate badly formatted documentation for such libraries.

Steps to Reproduce

N/A

Additional info

  • pdoc version:
    0.5.1

@kernc kernc added this to the 0.5.2 milestone Jan 24, 2019

@kernc

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2019

I was reluctant to accept this at first as everybody knows that the one true legible indentation style for Python is 4-space indentation. But apparently there really are well-established projects that remain to follow the old Google pystyle recommendation of 2-space indents. It thus makes sense, I guess, to support this indentation in Google-style docstrings as well.

@kernc kernc closed this in e2739ce Jan 24, 2019

@wq2012

This comment has been minimized.

Copy link
Contributor Author

commented Jan 24, 2019

Thanks a lot for the update.

Indeed, the issue is because of google's old and internal styles.

FYI, I'm using pdoc for this repo, which is based on 2-space indentation.

Generated docs now look great! Thanks for the changes.

@kernc

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2019

Support for Google docstrings is fairly recent. If you have any other ideas for improvement, they are very welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.