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

Multi-line summary lines are cut. #7

Open
Viech opened this issue Aug 15, 2019 · 2 comments
Open

Multi-line summary lines are cut. #7

Viech opened this issue Aug 15, 2019 · 2 comments

Comments

@Viech
Copy link

Viech commented Aug 15, 2019

I'm aware that docstring summary lines that are actually longer than one line are not PEP 257 compliant – but they do appear in practice, in particular if you have some markup in them. I suggest to treat any text up to the first blank line as the summary line.

@Viech
Copy link
Author

Viech commented Aug 19, 2019

I spent around two days on a PEP 257 refactoring as otherwise autoapi does pretty much what I want it to do. So on my end the issue is resolved. I still think this is a valid feature request that could save other users some trouble, in particular because other doc generators behave as proposed so switching over from one of them becomes easier.

@carlos-jenkins
Copy link
Owner

Hi @Viech

Thanks for the feedback. Indeed, I can agree with you. I suspect that the culprit could be this function:

def filter_summary(obj):

Which is doing:

summary = doc.split('\n').pop(0)

This can be improved indeed. Will try to find time to identify how to do it better.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants